Antoine Pitrou wrote:
> So to know if "deferred" was correctly used, I had to devise a test to
> know if "timeout" is a number
Another solution might have been to require it to
be passed as a keyword (which will become easier
if the proposal for keyword-only arguments gets
in).
--
Greg
_
Le dimanche 19 novembre 2006 à 12:44 -0500, George Sakkis a écrit :
> I understand this is not the point you're trying to make, but in such
> cases I usually prefer to make @decorator be equivalent to
> @decorator() by something like:
I could do that, but it's not very clean. Also it doesn't inva
On 11/19/06, George Sakkis <[EMAIL PROTECTED]> wrote:
> That's perhaps one of the top gotchas in Python today; thankfully it
> will change in 3.0. Until then, I can't see how one can avoid an
> explicit check, either by testing with isinstance() or trying to call
> an arbitrary method of the expect
On 11/19/06, Antoine Pitrou <[EMAIL PROTECTED]> wrote:
> I had the problem recently when I wrote a decorator which took an
> optional number as an argument. The decorator declaration goes like
> this:
>
> def deferred(timeout=None):
> def decorate(func):
> blah blah...
> return dec
Le samedi 18 novembre 2006 à 22:42 -0700, Neil Toronto a écrit :
> Actually, plenty of people would dream of it and even do it. I've seen
> some pretty evil implementations of Java interfaces. All they can
> enforce is static types and method signatures.
But protecting against erroneous use (ra
On 4/11/06, Ian Bicking <[EMAIL PROTECTED]> wrote:
> So Guido asked for more concrete discussion of things like views. A
> richer set of collections also fits in here, as for instance dict.keys()
> would be a view with a collection interface not exactly like other
> collections. I wrote up some n
So Guido asked for more concrete discussion of things like views. A
richer set of collections also fits in here, as for instance dict.keys()
would be a view with a collection interface not exactly like other
collections. I wrote up some notes, which I'll pass on.
So, I can imagine 3 attribute
On 4/5/06, Ian Bicking <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > I have to write my slides for a talk about Py3K later today, but I'll
> > be back. In the mean time I've rejected PEPs 245 and 246 in
> > expectation of something better that's imminent!
>
> Is PEP 245 ("Python Interfac
Guido van Rossum wrote:
> Fascinating ideas in this thread!
It's certainly been interesting to see convergence coming from both
directions independently.
> I spent some time blogging about this on artima:
> http://www.artima.com/weblogs/viewpost.jsp?thread=155123
>
> I have to write my slides f