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)
* Zen: "There should be one (and preferably only one) obvious way to
do it." We have a way of specifying the types this parameter
should accept; "allow_none" adds a second.
* Zen: "Special cases aren't special enough to break the rules".
"allow_none" was really just a special case of one possible type
for "types".
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 that C code is a lot more
restrictive /a priori/ which clinic has to accommodate, and type
annotations are a way of adding (unenforced) restrictions on Python
code. Still, from a 50,000' view, there seems to be an overlap in
functionality... and both are aimed at Py 3.5... I find that
interesting... I guess describing parameter types is the latest Python
trend :)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com