[Tutor] python workspace -- vars() vs locals()
denis.spir at free.fr
Wed Jun 3 09:50:38 CEST 2009
Le Tue, 02 Jun 2009 10:47:38 -0700,
Emile van Sebille <emile at fenx.com> s'exprima ainsi:
> On 6/2/2009 8:54 AM roberto said...
> > hello,
> > i'd like to ask if there is anything in python which helps to see what
> > variables have been defined and their type and their dimension etc;
> In appropriate contexts, you may be able to use a variant of:
> from pprint import pprint
> pprint (locals())
By the way, it take the opportunity to ask about the difference between vars() & locals().
la vita e estrany
More information about the Tutor