Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I find out the name of some variable?

Hello! For example I have variable p in sage notebook. I need my class can find out the name of variable:

sage: p = 3
sage: my_class(p)
ans:  'p'

How to implement this feature? Thanks.

How can I find out the name of some variable?

Hello! For example I have variable p in sage notebook. I need my class can find out the name of variable:

sage: p = 3
sage: my_class(p)
ans:  'p'

How to implement this feature? Thanks.Thanks. P.S.: sorry if my english isn't good.

How can I find out the name of some variable?

Hello! For example I have variable p in sage notebook. I need my class can find out the name of variable:

sage: p = 3
sage: my_class(p)
ans:  'p'

How to implement this feature? Thanks. P.S.: sorry if my english isn't good.