thanks Gabriel
str(key)[7:-2] = key.__name__
I didn't know that one
Nice to see you built a useful tool! It's a great way to learn a language.
Yes, and this group is helping me a whole lot, thanks !
cheers,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
At Thursday 18/1/2007 19:24, Stef Mientki wrote:
str(key)[7:-2] = key.__name__
I didn't know that one
It's here: http://docs.python.org/lib/specialattrs.html
--
Gabriel Genellina
Softlab SRL
__
At Tuesday 16/1/2007 20:13, Stef Mientki wrote:
Ok, here's my current solution,
probably not very Pythonian, (so suggestions are welcome)
but it works.
It appears that you're a number crunching guy - you absolutely ignore
all types except numeric ones! :)
(Too bad I can get the name of
hi Gabriel,
It appears that you're a number crunching guy - you absolutely ignore
all types except numeric ones! :)
Is there anything else than numbers ? ;-)
But indeed I forgot the else statement, which should look like this:
else:
line = 'UNKNOWN: ' + type(V)
print line
At Wednesday 17/1/2007 19:46, Stef Mientki wrote:
for key,value in count:
line += ' %s=%d' % (key, value)
I didn't succeed to use value as a enumerator, and I had to typecast
key into a string (and skipping
some redundant information, but then it works great, thanks !!
Ouch,
On 2007-01-15, Gabriel Genellina [EMAIL PROTECTED] wrote:
At Monday 15/1/2007 17:45, Stef Mientki wrote:
Is there some handy/ nice manner to view the properties of some variable ?
As a newbie, I often want to see want all the properties of a var,
and also some corner values (large arrays) etc.
Neil Cerutti [EMAIL PROTECTED] wrote:
dir( [object])
[...] The list is not necessarily
complete. If the object is a module object, the list contains
the names of the module's attributes. If the object is a type
or class object, the list contains the names of its attributes,
Adam wrote:
Stef Mientki wrote:
hello,
Is there some handy/ nice manner to view the properties of some variable ?
As a newbie, I often want to see want all the properties of a var,
and also some corner values (large arrays) etc.
Probably it's not so difficult,
but I don't see how to
hello,
Is there some handy/ nice manner to view the properties of some variable ?
As a newbie, I often want to see want all the properties of a var,
and also some corner values (large arrays) etc.
Probably it's not so difficult,
but I don't see how to distinguish for example between a string and
At Monday 15/1/2007 17:45, Stef Mientki wrote:
Is there some handy/ nice manner to view the properties of some variable ?
As a newbie, I often want to see want all the properties of a var,
and also some corner values (large arrays) etc.
You can try dir(x), vars(x). If you want a nice print,
Stef Mientki wrote:
hello,
Is there some handy/ nice manner to view the properties of some variable ?
As a newbie, I often want to see want all the properties of a var,
and also some corner values (large arrays) etc.
Probably it's not so difficult,
but I don't see how to distinguish for
Stef Mientki wrote:
hello,
Is there some handy/ nice manner to view the properties of some variable ?
As a newbie, I often want to see want all the properties of a var,
and also some corner values (large arrays) etc.
Probably it's not so difficult,
but I don't see how to distinguish for
12 matches
Mail list logo