[Python-Dev] Re: Adding a scarier warning to object.__del__?

2020-01-02 Thread Armin Rigo
Hi, On Thu, 2 Jan 2020 at 03:59, Yonatan Zunger wrote: > It is possible (though not recommended!) for the __del__() method to postpone > destruction of the instance by creating a new reference to it. This is called > object resurrection. It is implementation-dependent whether __del__() is > ca

[Python-Dev] Re: Adding a scarier warning to object.__del__?

2020-01-02 Thread Andrew Svetlov
I would say that the "recommended" weakref.finalize() shares very many limitations of __del__(), that's why hard to buy it. atexit.register() is not a common thing, the recommendation of using atexit for file descriptor closing *in general* looks weird, while it can be a good solution in some parti

[Python-Dev] Re: Adding a scarier warning to object.__del__?

2020-01-02 Thread Yonatan Zunger
weakref.finalize always executes during the ordinary Python flow, IIUC -- e.g., it happens before the interpreter is stopping. I guess it does still have the "arbitrary thread" limitation -- which is a good point, I may have some code bugs of my own to fix. But it's a huge difference in terms of pr

[Python-Dev] Re: Python Documentation and AIX specifics - how to proceed?

2020-01-02 Thread Brett Cannon
That whole directory is mostly outdated (e.g. those Wing files are two major versions behind and we have ripped out all other editor-specific files in the repo). I think the first question is what do we want for that directory to be? Based on that we can decide if something like AIX build instru

[Python-Dev] Re: Should set objects maintain insertion order too?

2020-01-02 Thread Brett Cannon
The only `OrderedSet` use I have seen in the wild is https://github.com/python-hyper/uritemplate/search?q=orderedset&unscoped_q=orderedset . ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org