Éric Araujo mer...@netwok.org added the comment:
I misreported: dict.update is actually okay, but collections.Counter.update (a
Python method) is a not an unbound method but a function (py3k-style).
--
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
Please also see the proposed PEP 3155
I’ve seen it and like it. I assume you’re telling that we should consider
str(cls/mod/func) to return the qname instead of the name? I think it could be
good. My patch can wait for your PEP, or go in
Éric Araujo mer...@netwok.org added the comment:
I’ve updated my patch to handle modules and functions too, but there is a
decision to make. The functions of built-in modules are implemented by
methodobject.c, not functionobject.c (that’s for Python functions), so if we
want
Guido van Rossum gu...@python.org added the comment:
On Wed, Nov 2, 2011 at 9:31 AM, Éric Araujo rep...@bugs.python.org wrote:
Éric Araujo mer...@netwok.org added the comment:
I’ve updated my patch to handle modules and functions too, but there is a
decision to make. The functions of
Antoine Pitrou pit...@free.fr added the comment:
Please also see the proposed PEP 3155 -
http://mail.python.org/pipermail/python-ideas/2011-October/012609.html
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
Éric Araujo mer...@netwok.org added the comment:
[Guido]
What's holding this up?
- I haven’t updated the patch for function and module objects yet
- I need to catch up with the python-ideas discussion
- There is at least one strong argument against the idea (I’ll point it out on
the ML)
Guido van Rossum gu...@python.org added the comment:
What's holding this up?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13224
___
___
Éric Araujo mer...@netwok.org added the comment:
Here’s the python-ideas thread:
http://mail.python.org/pipermail/python-ideas/2011-October/thread.html#12459
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13224
Éric Araujo mer...@netwok.org added the comment:
I would argue that the previous behavior of str(class) was undefined, or an
implementation detail; as a new feature, my patch can break some code that
relied on the previous behavior, but we may judge think it’s worth the cost.
BTW, doctest is
New submission from Éric Araujo mer...@netwok.org:
Suggestion by Guido on #868845:
Off-topic: I sometimes wish that the str() of a class would return the class
name rather than its repr(); that way print(str) would print str instead of
class 'str'. (Use case: printing an exception and its
Changes by Éric Araujo mer...@netwok.org:
--
keywords: +patch
Added file: http://bugs.python.org/file23468/change-class-__str__.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13224
___
Éric Araujo mer...@netwok.org added the comment:
Suggestion by Guido on #868845:
I sometimes wish that the str() of a class would return the class name
rather than its repr(); that way print(str) would print str
instead of class 'str'. (Use case: printing an exception and its
message: I
Changes by Éric Araujo mer...@netwok.org:
--
Removed message: http://bugs.python.org/msg145945
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13224
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
It looks like your change breaks backward compatibility (e.g. tests written
using doctests). I don't know if it's a problem or not.
--
nosy: +haypo
___
Python tracker
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti, gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13224
___
___
15 matches
Mail list logo