[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It might be not obvious, but it's consistent with the check for other attributes. I don't know what attributes you're talking about, and there doesn't seem to be a lot of consistency there. Besides, being consistently obscure and hard to find

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Committed in r86842. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10518

[issue10518] Bring back callable()

2010-11-27 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: I thought PEP 3003 was quite unambiguous: This PEP proposes a temporary moratorium (suspension) of **all changes** to the Python language syntax, semantics, and built-ins for a period of at least two years from the release of

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le samedi 27 novembre 2010 à 22:23 +, SilentGhost a écrit : SilentGhost michael.mischurow+...@gmail.com added the comment: I thought PEP 3003 was quite unambiguous: The stated goal of the moratorium is to make it easier for alternate

[issue10518] Bring back callable()

2010-11-27 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: I thought that moratorium meant Guido dis/approval is not applicable to the 3.2 Another listed change was help ease adoption of py3k. How's that helping? -- ___ Python tracker

[issue10518] Bring back callable()

2010-11-27 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/11/27 SilentGhost rep...@bugs.python.org: SilentGhost michael.mischurow+...@gmail.com added the comment: I thought that moratorium meant Guido dis/approval is not applicable to the 3.2 Another listed change was help ease

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I thought that moratorium meant Guido dis/approval is not applicable to the 3.2 Guido can decide of everything: PEPs, etc. That's what BDFL means. So he can also decide of exceptions to the rules he decided on. (rules can have exception in any

[issue10518] Bring back callable()

2010-11-27 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: yes, my problem is that callable was removed and a way was shown how to do this check. The way which is consistent with the check for any other type (ABC). Now out of the blue, w/o any justification this way is going to be ignored,

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: yes, my problem is that callable was removed and a way was shown how to do this check. The way which is consistent with the check for any other type (ABC). ABCs are still the exception in Python, and duck typing is still the rule. I don't

[issue10518] Bring back callable()

2010-11-27 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: ABCs are still the exception in Python, and duck typing is still the rule. Then why do we callable again? Don't worry, I'll deal with it. It's not like this whole discussion mattered. --

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: ABCs are still the exception in Python, and duck typing is still the rule. Then why do we callable again? Because the way __call__ is looked up means hasattr(x, __call__) is not the right answer. Otherwise there would be no point in

[issue10518] Bring back callable()

2010-11-25 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: I was originally surprised to find that callable() was gone. I pointed it out at Europython and got a very informative explanation from Brett. The isinstance(obj, collections.Callable) was introduced and it works well. I'm with Ezio here. I'm -1

[issue10518] Bring back callable()

2010-11-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm with Ezio here. I'm -1 for callable(), +0 for iscallable() (there should be preferably one obvious way to do it and using isinstance() seems to be that way at this point). The thing is, isisinstance(x, collections.Callable) is hardly

[issue10518] Bring back callable()

2010-11-25 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Bringing back callable but with a different name is horrible. Just bring it back for goodness sake. -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org

[issue10518] Bring back callable()

2010-11-25 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: Just for the reference: What's new in Python 3.0 page says: Removed callable(). Instead of callable(f) you can use isinstance(f, collections.Callable). The operator.isCallable() function is also gone. There doesn't seem to be

[issue10518] Bring back callable()

2010-11-25 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Well, Guido has already approved its return - so further debate is relatively pointless. (Not that that usually stops us...) -- ___ Python tracker rep...@bugs.python.org

[issue10518] Bring back callable()

2010-11-25 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: surely, such a relevant bit of information is worth linking to! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10518 ___

[issue10518] Bring back callable()

2010-11-25 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: It was on python-ideas in the recent thread about bringing back callable. Feel free to post a link here for the record. -- ___ Python tracker rep...@bugs.python.org

[issue10518] Bring back callable()

2010-11-25 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: I wouldn't consider it approving, what Guido says is: I admit defeat on this one http://mail.python.org/pipermail/python-ideas/2010-November/008747.html Which incidentally is in response to your e-mails with the actual discussion

[issue10518] Bring back callable()

2010-11-25 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10518 ___ ___ Python-bugs-list

[issue10518] Bring back callable()

2010-11-24 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: It was just resting. Here is a patch to wake it up for 3.2 (or 3.3 pending moratorium interpretation). As for the py3k warning in 2.x (and the 2to3 fixer), it's not obvious what we should do: callable() clearly doesn't exist in 3.0 and 3.1.

[issue10518] Bring back callable()

2010-11-24 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I think we should lift the py3k warning after 3.2 is released, but leave the 2to3 fixer in for the time being. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10518

[issue10518] Bring back callable()

2010-11-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Does the plan include deprecating collections.Callable? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10518 ___

[issue10518] Bring back callable()

2010-11-24 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: What is the reason for this? Why do we need it? -- nosy: +SilentGhost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10518 ___

[issue10518] Bring back callable()

2010-11-24 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm not sure it's worth bringing callable() back at this point. It would have made more sense for 3.1, but now we already have 2 callable()-less versions of Python if we do it for 3.2 (what about the moratorium though?) or 3 if we do it