Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36305 > unrolled thread
| Started by | Dave Angel <d@davea.name> |
|---|---|
| First post | 2013-01-06 18:32 -0500 |
| Last post | 2013-01-06 18:32 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Over 30 types of variables available in python ? Dave Angel <d@davea.name> - 2013-01-06 18:32 -0500
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2013-01-06 18:32 -0500 |
| Subject | Re: Over 30 types of variables available in python ? |
| Message-ID | <mailman.198.1357515157.2939.python-list@python.org> |
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
Back to top | Article view | comp.lang.python
csiph-web