'new' module deprecation in python2.6

David Pratt fairwinds.dp at gmail.com
Sat Nov 29 12:50:16 EST 2008


Yeah, can just use types.ClassType instead of new.classobj, but still  
wonder what happens when we get to python 3.

Regards,
David


On Nov 29, 2008, at 1:04 PM, Michael Crute wrote:

> On Sat, Nov 29, 2008 at 11:52 AM, David Pratt  
> <fairwinds.dp at gmail.com> wrote:
>> Can someone tell me why 'new' has been deprecated in python 2.6  
>> and provide
>> direction for code that uses new for the future.
>> I find new is invaluable for some forms of automation. I don't see a
>> replacement for python 3 either. Many thanks.
>
> You might want to take a look at PEP 3108[1] which says:
>
> new
>
>     * Just a rebinding of names from the 'types' module.
>     * Can also call type built-in to get most types easily.
>     * Docstring states the module is no longer useful as of revision
> 27241 (2002-06-15).
>
> [1] http://www.python.org/dev/peps/pep-3108/
>
> -mike
>
>
> -- 
> ________________________________
> Michael E. Crute
> http://mike.crute.org
>
> God put me on this earth to accomplish a certain number of things.
> Right now I am so far behind that I will never die. --Bill Watterson




More information about the Python-list mailing list