[ python-Bugs-1100368 ] Wrong "type()" syntax in docs
SourceForge.net
noreply at sourceforge.net
Tue Jan 25 22:31:44 CET 2005
Bugs item #1100368, was opened at 2005-01-11 14:03
Message generated for change (Comment added) made by mcherm
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1100368&group_id=5470
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Facundo Batista (facundobatista)
Assigned to: Nobody/Anonymous (nobody)
Summary: Wrong "type()" syntax in docs
Initial Comment:
>From the current docs:
type(object):
Return the type of an object. The return value
is a type object.
>From the interpreter:
>>> help(type)
Help on class type in module __builtin__:
class type(object)
| type(object) -> the object's type
| type(name, bases, dict) -> a new type
In the documentation is missing the second syntax form.
----------------------------------------------------------------------
>Comment By: Michael Chermside (mcherm)
Date: 2005-01-25 16:31
Message:
Logged In: YES
user_id=99874
cjwhrh's comment doesn't seem relevent. It is generally true
of ALL builtins that they can be shadowed by local variables.
Facundo is probably right that the newer use of type() should
be documented.
----------------------------------------------------------------------
Comment By: Colin J. Williams (cjwhrh)
Date: 2005-01-18 17:03
Message:
Logged In: YES
user_id=285587
The accuracy of the above depends partly on the context.
Within a function or method which has "type" as a parameter
the type function described above is no longer accessible.
Colin W.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1100368&group_id=5470
More information about the Python-bugs-list
mailing list