[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou 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 bringing it bac

[issue10518] Bring back callable()

2010-11-27 Thread SilentGhost
SilentGhost 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. -- ___ Python tracker

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou 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 like that we'

[issue10518] Bring back callable()

2010-11-27 Thread SilentGhost
SilentGhost 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, because "ah, sure. I can't be

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou 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 reasonable

[issue10518] Bring back callable()

2010-11-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/11/27 SilentGhost : > > SilentGhost 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? By causing one less discontinuit

[issue10518] Bring back callable()

2010-11-27 Thread SilentGhost
SilentGhost 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 Antoine Pitrou
Antoine Pitrou added the comment: Le samedi 27 novembre 2010 à 22:23 +, SilentGhost a écrit : > SilentGhost added the comment: > > I thought PEP 3003 was quite unambiguous: The stated goal of the moratorium is to make it easier for alternate implementations to catch up with the current la

[issue10518] Bring back callable()

2010-11-27 Thread SilentGhost
SilentGhost 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 Python 3.1. In particular, the mo

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r86842. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue10518] Bring back callable()

2010-11-27 Thread Antoine Pitrou
Antoine Pitrou 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 is not the

[issue10518] Bring back callable()

2010-11-25 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue10518] Bring back callable()

2010-11-25 Thread SilentGhost
SilentGhost added the comment: I wouldn't consider it "approving", what Guido says is: > I admit defeat on this one Which incidentally is in response to your e-mails with the actual discussion following it. --

[issue10518] Bring back callable()

2010-11-25 Thread Michael Foord
Michael Foord 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 _

[issue10518] Bring back callable()

2010-11-25 Thread SilentGhost
SilentGhost added the comment: surely, such a relevant bit of information is worth linking to! -- ___ Python tracker ___ ___ Python-b

[issue10518] Bring back callable()

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

[issue10518] Bring back callable()

2010-11-25 Thread SilentGhost
SilentGhost 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 any indication than in two-ver

[issue10518] Bring back callable()

2010-11-25 Thread Michael Foord
Michael Foord 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

[issue10518] Bring back callable()

2010-11-25 Thread Antoine Pitrou
Antoine Pitrou 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 obvious to anyb

[issue10518] Bring back callable()

2010-11-25 Thread Łukasz Langa
Łukasz Langa 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 for callable(),

[issue10518] Bring back callable()

2010-11-24 Thread Ezio Melotti
Ezio Melotti 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 for 3.3. Also if isinst

[issue10518] Bring back callable()

2010-11-24 Thread SilentGhost
SilentGhost added the comment: What is the reason for this? Why do we need it? -- nosy: +SilentGhost ___ Python tracker ___ ___ Pytho

[issue10518] Bring back callable()

2010-11-24 Thread Éric Araujo
Éric Araujo added the comment: Does the plan include deprecating collections.Callable? -- nosy: +eric.araujo ___ Python tracker ___ _

[issue10518] Bring back callable()

2010-11-24 Thread Benjamin Peterson
Benjamin Peterson 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 ___ __

[issue10518] Bring back callable()

2010-11-24 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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. -- assi