• Guido van Rossum's avatar
    Printing objects to a real file still wasn't done right: if the · 4f288ab7
    Guido van Rossum yazdı
    object's type didn't define tp_print, there were still cases where the
    full "print uses str() which falls back to repr()" semantics weren't
    honored.  This resulted in
    
        >>> print None
        <None object at 0x80bd674>
        >>> print type(u'')
        <type object at 0x80c0a80>
    
    Fixed this by always using the appropriate PyObject_Repr() or
    PyObject_Str() call, rather than trying to emulate what they would do.
    
    Also simplified PyObject_Str() to always fall back on PyObject_Repr()
    when tp_str is not defined (rather than making an extra check for
    instances with a __str__ method).  And got rid of the special case for
    strings.
    4f288ab7
Adı
Son kayıt (commit)
Son güncelleme
..
.cvsignore Loading commit data...
abstract.c Loading commit data...
bufferobject.c Loading commit data...
cellobject.c Loading commit data...
classobject.c Loading commit data...
cobject.c Loading commit data...
complexobject.c Loading commit data...
dictobject.c Loading commit data...
fileobject.c Loading commit data...
floatobject.c Loading commit data...
frameobject.c Loading commit data...
funcobject.c Loading commit data...
intobject.c Loading commit data...
iterobject.c Loading commit data...
listobject.c Loading commit data...
longobject.c Loading commit data...
methodobject.c Loading commit data...
moduleobject.c Loading commit data...
object.c Loading commit data...
obmalloc.c Loading commit data...
rangeobject.c Loading commit data...
sliceobject.c Loading commit data...
stringobject.c Loading commit data...
tupleobject.c Loading commit data...
typeobject.c Loading commit data...
unicodectype.c Loading commit data...
unicodeobject.c Loading commit data...
unicodetype_db.h Loading commit data...
xxobject.c Loading commit data...