Re: [Python-Dev] PEP 426 is now the draft spec for distribution metadata 2.0

2013-02-18 Thread Nick Coghlan
On Mon, Feb 18, 2013 at 9:54 AM, Nick Coghlan ncogh...@gmail.com wrote: On 18 Feb 2013 08:36, Fred Drake f...@fdrake.net wrote: On Sun, Feb 17, 2013 at 4:21 PM, Nick Coghlan ncogh...@gmail.com wrote: As Daniel pointed out, easy_install and pip also don't follow this rule yet, so it won't

[Python-Dev] Rationale for different signatures of tuple.__new__ and namedtuple.__new__

2013-02-18 Thread John Reid
Hi, I can do tuple([1,2,3]) but not: from collections import namedtuple namedtuple('B', 'x y z')([1,2,3]) I get a TypeError: __new__() takes exactly 4 arguments (2 given) However I can do: namedtuple('B', 'x y z')._make([1,2,3]) So namedtuple's _make classmethod looks a lot like tuple's

Re: [Python-Dev] Rationale for different signatures of tuple.__new__ and namedtuple.__new__

2013-02-18 Thread Hrvoje Niksic
On 02/18/2013 03:32 PM, John Reid wrote: I can do tuple([1,2,3]) but not: from collections import namedtuple namedtuple('B', 'x y z')([1,2,3]) I get a TypeError: __new__() takes exactly 4 arguments (2 given) However I can do: namedtuple('B', 'x y z')._make([1,2,3]) So namedtuple's _make

Re: [Python-Dev] cpython (2.7): Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).

2013-02-18 Thread Antoine Pitrou
On Mon, 18 Feb 2013 11:24:40 +0100 (CET) serhiy.storchaka python-check...@python.org wrote: +def test_realpath_curdir(self): +self.assertEqual(realpath('.'), os.getcwd()) +self.assertEqual(realpath('./.'), os.getcwd()) +self.assertEqual(realpath('/'.join(['.'] *

Re: [Python-Dev] cpython (2.7): Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).

2013-02-18 Thread Serhiy Storchaka
On 18.02.13 19:26, Antoine Pitrou wrote: On Mon, 18 Feb 2013 11:24:40 +0100 (CET) serhiy.storchaka python-check...@python.org wrote: +def test_realpath_curdir(self): +self.assertEqual(realpath('.'), os.getcwd()) +self.assertEqual(realpath('./.'), os.getcwd()) +

Re: [Python-Dev] cpython (2.7): Fix posixpath.realpath() for multiple pardirs (fixes issue #6975).

2013-02-18 Thread Antoine Pitrou
On Mon, 18 Feb 2013 19:56:07 +0200 Serhiy Storchaka storch...@gmail.com wrote: On 18.02.13 19:26, Antoine Pitrou wrote: On Mon, 18 Feb 2013 11:24:40 +0100 (CET) serhiy.storchaka python-check...@python.org wrote: +def test_realpath_curdir(self): +

Re: [Python-Dev] Rationale for different signatures of tuple.__new__ and namedtuple.__new__

2013-02-18 Thread Terry Reedy
Later today you posted Differences creating tuples and collections.namedtuples on python-list. http://thread.gmane.org/gmane.comp.python.general/726849 That *is* the proper place to make observations about current Python and ask questions about why it is the way it is and how to work around