On 5/19/06, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote:
> "Collin Winter" <[EMAIL PROTECTED]> writes:
> > 2. Similarly, annotation classes might want to do more complex
> > parameter validation. Or(), for instance, might want to assert that it
> > needs at least two distinct parameters (that is, Or(int, int, int)
> > simplifies to Or(int), which makes no sense and is an error).
>
> It does make sense. Or(int) denotes the same set of values as int.
>
> You could as well complain that x+0 makes no sense and a language
> should refuse to compute it, asking the programmer to use x instead.

I have yet to see a case where the type of a function wasn't specified
by the user writing it out by hand. Given this, it's highly unlikely
that the user intentionally wrote Or(int) instead of int; they've
accidentally left out a type somewhere, and it should be brought to
their attention.

Since Python 3000 will support things like "ClassA | ClassB", would
you claim that "ClassA |" isn't an error (albeit a syntax error
instead of a call error)?

Collin Winter
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to