Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Over 30 types of variables available in python ?

Reply
Thread Tools

Re: Over 30 types of variables available in python ?

 
 
Dave Angel
Guest
Posts: n/a
 
      01-06-2013
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 exactly one object of type Null which is None), tracebacks, frames
> generators, iterators, xranges,
> files,
>
> memoryviews,
> context managers,
>
> These are all listed in this page http://docs.python.org/2/library/stdtypes.html as built-in types. Am I getting anything wrong here ? I'm a bit confused about it. I have never seen so many types in the few programming languages I saw.
>


First, you're describing Python 2.x ; 3.x is different in a few
ways. For one, int and long are combined into a single type.

Variables don't have types. Only objects have types. A name can be
bound to any object, regardless of its type, or to what it might have
been previously bound.

Otherwise, you're right. Python is a rich language, with "batteries
included." There's a lot in the built-in space, but if you include the
stdlib, it's really rich. And if you include the fact that objects you
define yourself are first-class, there are very few limits.



--

DaveA

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Over 30 types of variables available in python ? chaouche yacine Python 6 01-11-2013 05:20 AM
Re: Over 30 types of variables available in python ? Terry Reedy Python 0 01-07-2013 12:45 AM
Over 30 types of variables available in python ? chaouche yacine Python 0 01-06-2013 11:12 PM
VOIP over VPN over TCP over WAP over 3G Theo Markettos UK VOIP 2 02-14-2008 03:27 PM
Boost + Python C/API: Mixing python return types with boost return types Steve Knight Python 2 10-10-2003 10:11 AM



Advertisments