[Python-Dev] cpython: we can call singleton types now (original) (raw)
Georg Brandl g.brandl at gmx.net
Sat Jul 30 19:13:20 CEST 2011
- Previous message: [Python-Dev] cpython (2.7): note Ellipsis syntax
- Next message: [Python-Dev] [Python-checkins] cpython: Modernize modulefinder module and tests a bit.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 07/30/11 17:03, benjamin.peterson wrote:
http://hg.python.org/cpython/rev/4a07b772f0e0 changeset: 71639:4a07b772f0e0 user: Benjamin Peterson <benjamin at python.org> date: Sat Jul 30 10:03:09 2011 -0500 summary: we can call singleton types now
files: Doc/library/stdtypes.rst | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2706,7 +2706,7 @@ This object is returned by functions that don't explicitly return a value. It supports no special operations. There is exactly one null object, named -
None
(a built-in name). +None
(a built-in name). Callingtype(None)
produces the same singleton.
I know this is technically correct, but it will look like you mean "calling type with None as argument" (same for the other singletons).
Probably better to say something like "type(None)()
produces ...".
Georg
- Previous message: [Python-Dev] cpython (2.7): note Ellipsis syntax
- Next message: [Python-Dev] [Python-checkins] cpython: Modernize modulefinder module and tests a bit.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]