actually in python everything is a type of object
it is like the VB concept of a variant( eg '12' can be treated as a double or an int or a string using coercion)
You're right.
BBC Basic was the first language to use coercion that I am aware of
Never heard of that.
followed by the Sinclair QL
circa 1985
I was born in 1985
sometimes in vb a particular type does not compile properly but if you just call it an object then it works ok - typical microsoft bugs
Untill you try to compare two values. Then the misery begins... My advice: do not use the object type, unless you're desperate
i think therefore everything in python is an implicit pointer
for x :0:10:1; (this is a fornext loop)
x goes from 0 to
LESS THAN 10 eg 0,1,2,3,4,5,6,7,8,9
r = [for x :0:10:1] gives you [0,1,2,3,4,5,6,7,8,9]
r = [0,1,2,3,4,5,6,7,8,9]
very useful that is you get a list holding the results
a variation on this is to take a list of objects
run through this(
oldlist) list,
applying a condition(filter) so you get another list(
newlist) which is a
SUBSET of the first one
Isn't this like an enumeration? I learned that in Pascal
I havent checked yet but I believe this is a list of pointers to the objects in the original list so if you change one of the objects in the
new list it will be reflected in one of the objects in the old list