Welcome~~~


Another blog:
http://fun-st.blogspot.com/

It is easier to write an incorrect program than understand a correct one.

Thursday, February 24, 2011

"new" module in Python

Notes on "new" module in Python:


>>> import new
>>> dir(new)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'classobj', 'code', 'function', 'instance', 'instancemethod', 'module']


-----------------------
>>> help(new)



Help on module new:


NAME
    new - Create new objects of various types.  Deprecated.


FILE
    c:\python26\lib\new.py


DESCRIPTION
    This module is no longer required except for backward compatibility.
    Objects of most types can now be created by calling the type object.

No comments:

Post a Comment