Re: Over 30 types of variables available in python ?

2013-01-10 Thread Rick Johnson
On 1-7-2013 2:53:26 AM UTC-6, chaouche yacine wrote: Thanks for all your comments. It appears to me that there is a slight confusion between types and classes then, plus other entities (protocols ?) The only confusion stems from improper terminology. Class is the worst possible word to

Re: Over 30 types of variables available in python ?

2013-01-07 Thread chaouche yacine
...@udel.edu To: python-list@python.org Sent: Monday, January 7, 2013 1:45 AM Subject: Re: Over 30 types of variables available in python ? On 1/6/2013 6:12 PM, chaouche yacine wrote: booleans ints, floats, longs, complexes strings, unicode strings lists, tuples, dictionaries, dictionary views, sets

Re: Over 30 types of variables available in python ?

2013-01-07 Thread Steven D'Aprano
On Mon, 07 Jan 2013 00:53:26 -0800, chaouche yacine wrote: Thanks for all your comments. It appears to me that there is a slight confusion between types and classes then, plus other entities (protocols ?) In Python 3, types and classes are synonyms. They mean the same thing. In Python 2,

Re: Over 30 types of variables available in python ?

2013-01-07 Thread Duncan Booth
chaouche yacine yacinechaou...@yahoo.com wrote: booleans ints, floats, longs, complexes strings, unicode strings lists, tuples, dictionaries, dictionary views, sets, frozensets, buffers, bytearrays, slices functions, methods, code objects,modules,classes, instances, types, nulls (there is

Re: Over 30 types of variables available in python ?

2013-01-07 Thread marduk
So I guess if one *really* wanted to compare C variables to Python variables, you could say that all python variables are of type void* except Python does all mallocs/frees and the casting for you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Over 30 types of variables available in python ?

2013-01-07 Thread Dave Angel
On 01/07/2013 09:32 AM, marduk wrote: So I guess if one *really* wanted to compare C variables to Python variables, you could say that all python variables are of type void* except Python does all mallocs/frees and the casting for you. A better analogy would be to C++, and all names would be

Re: Over 30 types of variables available in python ?

2013-01-07 Thread Chris Angelico
On Tue, Jan 8, 2013 at 1:45 AM, Dave Angel d...@davea.name wrote: On 01/07/2013 09:32 AM, marduk wrote: So I guess if one *really* wanted to compare C variables to Python variables, you could say that all python variables are of type void* except Python does all mallocs/frees and the casting

Re: Over 30 types of variables available in python ?

2013-01-06 Thread Chris Angelico
On Mon, Jan 7, 2013 at 10:12 AM, chaouche yacine yacinechaou...@yahoo.com wrote: booleans ints, floats, longs, complexes strings, unicode strings lists, tuples, dictionaries, dictionary views, sets, frozensets, buffers, bytearrays, slices functions, methods, code objects,modules,classes,

Re: Over 30 types of variables available in python ?

2013-01-06 Thread Dave Angel
On 01/06/2013 06:12 PM, chaouche yacine wrote: booleans ints, floats, longs, complexes strings, unicode strings lists, tuples, dictionaries, dictionary views, sets, frozensets, buffers, bytearrays, slices functions, methods, code objects,modules,classes, instances, types, nulls (there is

Re: Over 30 types of variables available in python ?

2013-01-06 Thread Terry Reedy
On 1/6/2013 6:12 PM, chaouche yacine wrote: booleans ints, floats, longs, complexes strings, unicode strings lists, tuples, dictionaries, dictionary views, sets, frozensets, buffers, bytearrays, slices functions, methods, code objects,modules,classes, instances, types, nulls (there is exactly