By adding a before the closing brace of the tucomma after 1. Python allow
this to disambiguate between braced expression and tuple

>>> type( (1,) )
<type 'tuple'>


2009/12/4 Петров Александр <gmdi...@gmail.com>

>
> How could I tell Python that "(1)" is not an integer, but an one-arity
> tuple ?
>
> Thank you,
> Alexander Petrov
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to