0

I'm learning the details of Python's garbage collection method recently.

The docs of Python just teach you how to use gc without further explanation in details.

I read this article. It's very helpful for me but seem to be out of date.

How does the gc works in Python-3.x ? Is there anything difference in the implementation?

ShawnWoo
  • 61
  • 8
  • I'd point you to this question because it's still useful, and the implementation linked in the accepted answer is very useful IMO http://stackoverflow.com/questions/4484167/details-how-python-garbage-collection-works. Note that that question was closed, though I think yours is a little narrower so I'm not casting a close vote – en_Knight Nov 25 '15 at 03:37
  • I'd also point you here https://docs.python.org/3/library/gc.html; while it doesn't do much implementation, there's at least one line with "starting with python 3..." so there are some differences, at least in the interfacing api. When you say "is there any difference in the implenetation" - difference between what? Python 2.7? Because certainly there is a difference from the earlier python versions that just did reference counting – en_Knight Nov 25 '15 at 03:38
  • @en_Knight Difference between the method in that [article](http://arctrix.com/nas/python/gc/). I had read the answer you recommend before I asked. The article I mentioned is from that answer. What I want is the explanation of the implementation of the Python3's GC in detail , just like that article did. – ShawnWoo Nov 25 '15 at 05:31
  • It seems a little silly to look for a *new* explanation of Python gc; it's unlikely there's anything except minor changes and performance improvements. If there was something major added, like more tiers of generational gc or fixed treatment of objects with destructors or another exceptional case like weak references, it would be very clear and probably have a pep. Realistically you're asking if there are any small changes, I think – en_Knight Nov 25 '15 at 21:19
  • @en_Knight okay i gonna find out that pep,thank you anyway – ShawnWoo Nov 26 '15 at 00:47

0 Answers0