Most probably a stupid question, but I still want to ask

Marko Rauhamaa marko at pacujo.net
Mon Apr 11 01:41:56 EDT 2016


Terry Reedy <tjreedy at udel.edu>:

> On 4/10/2016 8:17 PM, Fillmore wrote:
>
>> apparently my 'discontinuity' is mappable to the fact that there's no
>> such thing as one-element tuples in Python, and attempts to create
>> one will result in a string (i.e. an object of a different kind!)...
>
> Please work through the tutorial before posting wrong information
> about the basics of Python.
>
>>>> t = 1,
>>>> t
> (1,)

However, in some languages, one-dimensional vectors/tuples and scalars
are treated as equivalent (at least APL and Scheme).


Marko



More information about the Python-list mailing list