Re: [Python-Dev] Should instances really be able to dictate the "existence" of special methods?

2015-04-19 Thread Eric Snow
On Mon, Apr 20, 2015 at 4:37 AM, Guido van Rossum wrote: > OK, so I think there isn't anything we can or should do here. Yes, it's > possible that type(x).__add__ succeeds but x.__add__ fails. That's how you > spell descriptor. :-) You could also use a random number generator in > __getattribube__

Re: [Python-Dev] Should instances really be able to dictate the "existence" of special methods?

2015-04-19 Thread Guido van Rossum
OK, so I think there isn't anything we can or should do here. Yes, it's possible that type(x).__add__ succeeds but x.__add__ fails. That's how you spell descriptor. :-) You could also use a random number generator in __getattribube__... On Sun, Apr 19, 2015 at 6:36 PM, Eric Snow wrote: > On Mon,

Re: [Python-Dev] Should instances really be able to dictate the "existence" of special methods?

2015-04-19 Thread Eric Snow
On Mon, Apr 20, 2015 at 2:20 AM, Guido van Rossum wrote: > (I suppose this new thread is a result of some research you did regarding > the thread complaining about callable()?) Yep. :) > On Sun, Apr 19, 2015 at 4:03 PM, Eric Snow > wrote: >> >> _PyObject_LookupSpecial is used in place of obj.__

Re: [Python-Dev] Should instances really be able to dictate the "existence" of special methods?

2015-04-19 Thread Guido van Rossum
(I suppose this new thread is a result of some research you did regarding the thread complaining about callable()?) On Sun, Apr 19, 2015 at 4:03 PM, Eric Snow wrote: > _PyObject_LookupSpecial is used in place of obj.__getattribute__ for > looking up special methods. (As far as I recall it is no

[Python-Dev] Should instances really be able to dictate the "existence" of special methods?

2015-04-19 Thread Eric Snow
_PyObject_LookupSpecial is used in place of obj.__getattribute__ for looking up special methods. (As far as I recall it is not exposed in the stdlib, e.g. inspect.getattr_special.) Correct me if I'm wrong (please!), but there are two key reasons: * access to special methods in spite of obj.__ge

Re: [Python-Dev] Surely "nullable" is a reasonable name?

2015-04-19 Thread Larry Hastings
On 04/19/2015 01:26 PM, Glenn Linderman wrote: Is argument clinic a special case of type annotations? (Quoted and worded to be provocative, intentionally but not maliciously.) OK, I know that argument clinic applies to C code and I know that type annotations apply to Python code. And I know t

Re: [Python-Dev] Surely "nullable" is a reasonable name?

2015-04-19 Thread Glenn Linderman
On 4/19/2015 1:19 AM, Larry Hastings wrote: On 08/07/2014 09:41 PM, Larry Hastings wrote: Well! It's rare that the core dev community is so consistent in its opinion. I still think "nullable" is totally appropriate, but I'll change it to "allow_none". (reviving eight-month-old thread)

[Python-Dev] [Issue 22619] Patch needs a review

2015-04-19 Thread Riley Banks
Greetings. Can someone review Serhiy's patch for the following issue? https://bugs.python.org/issue22619 I see Dmitry pinged the issue like 2 months ago, then 1 month later... ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.or

Re: [Python-Dev] Surely "nullable" is a reasonable name?

2015-04-19 Thread Larry Hastings
On 08/07/2014 09:41 PM, Larry Hastings wrote: Well! It's rare that the core dev community is so consistent in its opinion. I still think "nullable" is totally appropriate, but I'll change it to "allow_none". (reviving eight-month-old thread) In case anybody here is still interested in arg