Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Reference counting mystery
Post: RE: Reference counting mystery

The reason for the if-else block is to make it easy to run the program once to observe the behavior in one case and then again, after changing the if line, to observe the behavior in the other case.
beezergeezer General Coding Help 4 2,945 Jul-24-2018, 02:37 PM
    Thread: Reference counting mystery
Post: RE: Reference counting mystery

Change the if True to if False to execute the other case.
beezergeezer General Coding Help 4 2,945 Jul-23-2018, 10:57 PM
    Thread: Reference counting mystery
Post: Reference counting mystery

Consider this code: import gc for i in range(10): gc.collect() if True: all_objects = gc.get_objects() print "Number of objects =", len(all_objects) else: print "...
beezergeezer General Coding Help 4 2,945 Jul-22-2018, 05:07 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020