Re: [Python-Dev] Possible undefined behavior on creating a method named "__dict__"

2018-04-11 Thread Guido van Rossum
On Wed, Apr 11, 2018 at 5:08 AM, Steven D'Aprano wrote: > On Wed, Apr 11, 2018 at 08:21:01AM -0300, Joao S. O. Bueno wrote: > > I just came across a code snippet that > > would define a method with the "__dict__" name - like in: > > > > class A: > > def __dict__(self): > > return ()

Re: [Python-Dev] Possible undefined behavior on creating a method named "__dict__"

2018-04-11 Thread Brett Cannon
On Wed, 11 Apr 2018 at 05:09 Steven D'Aprano wrote: > On Wed, Apr 11, 2018 at 08:21:01AM -0300, Joao S. O. Bueno wrote: > > I just came across a code snippet that > > would define a method with the "__dict__" name - like in: > > > > class A: > > def __dict__(self): > > return () > >

[Python-Dev] Reminder: 2018 Python Language Summit signups close next week

2018-04-11 Thread Larry Hastings
The deadline is a week from today, April 18th 2018.  Original announcement below. -- It’s that time again: time to start thinking about the Python Language Summit!  The 2018 summit will be held on Wednesday, May 9, from 10am to 4pm, at the Huntington Convention Center in Cleveland, Ohio,

Re: [Python-Dev] Possible undefined behavior on creating a method named "__dict__"

2018-04-11 Thread Steven D'Aprano
On Wed, Apr 11, 2018 at 08:21:01AM -0300, Joao S. O. Bueno wrote: > I just came across a code snippet that > would define a method with the "__dict__" name - like in: > > class A: > def __dict__(self): > return () That's a strange thing to do, but I don't think it ought to be illega

[Python-Dev] Possible undefined behavior on creating a method named "__dict__"

2018-04-11 Thread Joao S. O. Bueno
I just came across a code snippet that would define a method with the "__dict__" name - like in: class A: def __dict__(self): return () The resulting class's instances can be assigned dynamic attributes as usual, but one can never acess its actual local variables through instance.__

Re: [Python-Dev] Are undocumented functions part of the stable ABI?

2018-04-11 Thread Jeroen Demeyer
On 2018-04-10 13:49, Nick Coghlan wrote: If it's only a semantic level change in the way the macro gets expanded, then whether or not it needs an ABI version guard gets judged on a case-by-case basis, and in this particular case, my view would be that developers should be able to write extensions