Peter Waller added the comment:
I have just hit this bug and independently invented the exact fix of changing
the zero for a one. Any chance of getting this merged?
--
nosy: +Peter.Waller
___
Python tracker <rep...@bugs.python.org>
Peter Waller peter.wal...@gmail.com added the comment:
Hi - Great to see this functionality coming. There is one feature of it that I
would really like to see fixed, which is currently broken in
setuptools/distribute - I'm sorry if this is the wrong forum for this note, but
I wanted to add
Peter Waller peter.wal...@gmail.com added the comment:
Apologies for the bump, but it has been more than a year and I did attach a
patch! :-)
What next?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1711800
Changes by Peter Waller peter.wal...@gmail.com:
--
nosy: +Peter.Waller
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8668
___
___
Python-bugs-list
New submission from Peter Waller peter.wal...@gmail.com:
Apologies if there is a way of doing this, but I haven't been able to find
anything.
I need to be able to do the following:
my_tuple = namedtuple(my_tuple, a b c)
obj = my_tuple(1,2,3)
if isinstance(obj, namedtuple):
.. do stuff
Peter Waller peter.wal...@gmail.com added the comment:
Hi Antoine and Eric,
Thanks for your responses.
I need to be able to catch all named tuples, I don't know in advance what
instance of a namedtuple it might be, but I want my function to only accept
named tuples. Is this unreasonable
Peter Waller peter.wal...@gmail.com added the comment:
In this case, I need to have names for each object. It is also desirable to use
the namedtuple because of their lightweight nature.
If they were to subclass the namedtuple I would be happy to accept that, but I
really do want them to pass
Peter Waller peter.wal...@gmail.com added the comment:
Hi Amaury,
Thanks. I had heard of but never bothered to read about duck-typing before now;
though I have used it passively before. I think it does make sense in this
case. I can't imagine any case where checking for the _fields attribute
Peter Waller peter.wal...@gmail.com added the comment:
It looks like Matthew has dropped this feature from consideration.
See msg83993 .
--
nosy: +pwaller
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue694374