Re: explore current scope, or other hack

2010-11-16 Thread spir
On Mon, 15 Nov 2010 21:35:19 +0100 "Simen kjaeraas" wrote: > spir wrote: > > > On Mon, 15 Nov 2010 12:44:24 -0500 > > bearophile wrote: > > > >> spir: > >> > >> > 1. name objects automatically > >> > I need some objects to know their name (as field on themselves). the > >> only solution I ca

Re: explore current scope, or other hack

2010-11-15 Thread Simen kjaeraas
spir wrote: On Mon, 15 Nov 2010 12:44:24 -0500 bearophile wrote: spir: > 1. name objects automatically > I need some objects to know their name (as field on themselves). the only solution I can else imagine is for the user write: >x = ...; >x.name = "x"; What if you have two or

Re: explore current scope, or other hack

2010-11-15 Thread spir
On Mon, 15 Nov 2010 12:44:24 -0500 bearophile wrote: > spir: > > > 1. name objects automatically > > I need some objects to know their name (as field on themselves). the only > > solution I can else imagine is for the user write: > > x = ...; > > x.name = "x"; > > What if you have two

Re: explore current scope, or other hack

2010-11-15 Thread bearophile
spir: > 1. name objects automatically > I need some objects to know their name (as field on themselves). the only > solution I can else imagine is for the user write: > x = ...; > x.name = "x"; What if you have two or more references to the same object? Regarding your generic questi

explore current scope, or other hack

2010-11-15 Thread spir
Hello, Is there a way to explore the current scope, meaning the set of currently defined symbols? (Equivalent of python's vars(), locals(), globals().) I have 2 use cases for this: 1. name objects automatically I need some objects to know their name (as field on themselves). the only solution