[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: map/filter/reduce/lambda opinions and background unscientific
From:       Ron Adam <rrr () ronadam ! com>
Date:       2005-07-08 3:45:17
Message-ID: hFmze.220244$w15.180484 () tornado ! tampabay ! rr ! com
[Download RAW message or body]

Erik Max Francis wrote:

> Ron Adam wrote:
> 
>> It's not an empty tuple, it's an empty parenthesis.  Using tuples it 
>> would be.
>>
>> (a,) == (,)
>>
>> which would be the same as:
>>
>> (,) == (,)
> 
> 
>  >>> ()
> ()
>  >>> a = ()
>  >>> type(a)
> <type 'tuple'>
>  >>> (,)
>   File "<stdin>", line 1
>     (,)
>      ^
> SyntaxError: invalid syntax
> 
> You've wandered way off into the woods now.

Yes,  ummm seems soo...  err.

This is one of those Python isn't quite consistent for practical reasons 
area.  I don't create empty tuples that way very often, but [] is to () 
is to {} is pretty obvious so I don't really have a good excuse.

 >>> (1)
1
 >>> ()
()

 >>> (((((1)))))
1
 >>> ((()))
()

Well in my previous explanation I *mean* it to be empty parenthesis.

Does that help?

Cheers,
Ron


-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic