Carl J. Van Arsdall wrote:
>
> From my interpreter prompt:
>
tuple = ("blah")
len(tuple)
> 4
tuple2 = ("blah",)
len (tuple2)
> 1
>
> So why is a tuple containing the string "blah" without the comma of
> length four? Is there a good reason for this or is this a bug?
Additiona
On Wed, 14 Dec 2005 09:54:31 -0800, Carl J. Van Arsdall wrote:
>
> From my interpreter prompt:
>
> >>> tuple = ("blah")
There is a special place in Hell reserved for people who overwrite
built-in functions like tuple(), list(), str() and so forth. *wink*
> >>> len(tuple)
> 4
Brackets on t
On Wed, 14 Dec 2005 12:58:16 -0500 in comp.lang.python, Jean-Paul
Calderone <[EMAIL PROTECTED]> wrote:
[...]
>
>It's the comma that makes it a tuple. The parenthesis are only required in
>cases where the expression might mean something else without them.
That's almost true. Consider:
>>> t2 =
Carl J. Van Arsdall wrote:
>
> From my interpreter prompt:
>
> >>> tuple = ("blah")
> >>> len(tuple)
> 4
> >>> tuple2 = ("blah",)
> >>> len (tuple2)
> 1
>
> So why is a tuple containing the string "blah" without the comma of
> length four? Is there a good reason for this or is this a bug?
On Wed, 14 Dec 2005 09:54:31 -0800, "Carl J. Van Arsdall" <[EMAIL PROTECTED]>
wrote:
>
> From my interpreter prompt:
>
> >>> tuple = ("blah")
> >>> len(tuple)
>4
> >>> tuple2 = ("blah",)
> >>> len (tuple2)
>1
>
>So why is a tuple containing the string "blah" without the comma of
>length four? Is t
From my interpreter prompt:
>>> tuple = ("blah")
>>> len(tuple)
4
>>> tuple2 = ("blah",)
>>> len (tuple2)
1
So why is a tuple containing the string "blah" without the comma of
length four? Is there a good reason for this or is this a bug?
--
Carl J. Van Arsdall
[EMAIL PROTECTED]
Build