getting memory usage of varaibles

Ben Finney ben+python at benfinney.id.au
Thu May 4 00:11:44 EDT 2017


Larry Martell <larry.martell at gmail.com> writes:

> On Wed, May 3, 2017 at 12:57 AM, Chris Angelico <rosuav at gmail.com> wrote:
> > Coming right back to the beginning here: What do you expect the name
> > of an object to be?
>
> The name of the variable in the program, e.g. sql, db_conn, rows, etc.

That assumes that the object has exactly one name.

What about when multiple names are simultaneously bound to the same
object?

What about when there are no names bound to an object?

What about when there are several references to an object, but none of
those references are names?

-- 
 \            “There was a point to this story, but it has temporarily |
  `\                    escaped the chronicler's mind.” —Douglas Adams |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list