:
Kind+) -> (
:
(index:
notnegative+):
iterable+) -> IdentitySet:
Any+) -> IdentitySet:
loadablefilenamestring+ or fn:
loadableiterableofstrings+] [use_readline
= boolean+]) -> Stat:
profilefilename+]):
UniSet+]):
UniSet+]):
UniSet+]):
Kind:
IdentitySet:
(
:
( alt:[tc:
typeexceptdict+ or dictof
= typeoremptytuple+]) -> Kind:
(
:
(address:
objectaddress+) -> Kind:
(
:
( draw:[name
= modulename+ , at
= moduleaddress+]) -> Kind:
(
:
() -> KindOfProdFamily:
(path_prefix:
string+) -> Kind:
(scope:
Any+) -> Kind:
(filename:
string+, lineno:
positive+) -> KindOfProdFamily:
(
:
( 0..*: alt:[kind:
ClodoKind+ or sok:
SetOfClodoKind+]) -> KindOfRetClaSetFamily:
RootStateType:
(
:
(size:
notnegative+) -> KindOfSizeFamily:
(
:
(type:
type+) -> KindOfTypeFamily:
(
:
() -> Kind:
(
:
( 0..*:rel:
relationname+) -> KindOfInViaFamily:
anything:
Kind+) -> (
:
(index:
notnegative+)
:
notnegative+For each kind in the sequence, check whether the object is an element of that kind. If it is, the classification is the index of that kind in the sequence. If the end of the sequence is reached, the classification is the length of the sequence.
:
Kind+:
iterable+) -> IdentitySet
:
iterable+:
Any+) -> IdentitySet
:
Any+>>> from guppy import hpy >>> hpy().iso(1, 1, 1.0, [], [], {}) Partition of a set of 5 objects. Total size = 444 bytes. Index Count % Size % Cumulative % Kind (class / dict of class) 0 1 20 248 56 248 56 dict (no owner) 1 2 40 144 32 392 88 list 2 1 20 28 6 420 95 int 3 1 20 24 5 444 100 float >>>
:
loadablefilenamestring+ or fn:
loadableiterableofstrings+] [use_readline
= boolean+]) -> Stat
:
loadablefilenamestring+:
loadableiterableofstrings+use_readline
= boolean+:
profilefilename+])
:
profilefilename+>> from guppy import hpy >> hpy().heap().stat.dump(filename)The dump method appends a sample to the end of the file, containing a summary description of the current heap contents. The sequence of such samples can be browsed in the Profile Browser window.
:
UniSet+])
:
UniSet+:
UniSet+])
:
UniSet+])
:
Kind:
IdentitySet:
(
:
( alt:[tc:
typeexceptdict+ or dictof
= typeoremptytuple+]) -> Kind
:
typeexceptdict+dictof
= typeoremptytuple+:
(
:
(address:
objectaddress+) -> Kind
:
objectaddress+:
(
:
( draw:[name
= modulename+ , at
= moduleaddress+]) -> Kind
name
= modulename+at
= moduleaddress+:
(
:
() -> KindOfProdFamily
:
(path_prefix:
string+) -> Kind
:
string+:
(scope:
Any+) -> Kind
:
Any+:
(filename:
string+, lineno:
positive+) -> KindOfProdFamily
:
string+:
positive+:
(
:
( 0..*: alt:[kind:
ClodoKind+ or sok:
SetOfClodoKind+]) -> KindOfRetClaSetFamily
:
ClodoKind+:
SetOfClodoKind+:
RootStateType:
(
:
(size:
notnegative+) -> KindOfSizeFamily
:
(
:
(type:
type+) -> KindOfTypeFamily
:
type+:
(
:
() -> Kind
:
(
:
( 0..*:rel:
relationname+) -> KindOfInViaFamily
:
relationname+ [expression] |
Indexing of a dict, list, tuple (etc). The expression must be a Python expression that can be evaluated in a local environment. The environment will contain the builtins and a name 'hp' that is bound to the current Use instance. |
---|---|
.attribute |
Getting an attribute from a builtin type or a slot of a slotted type. (I.E. not an attribute that is in a dict of an object.) |
.f_locals["name"] |
A local variable of a frame. |
.f_locals ["name"] |
A variable in a CELL of a frame.
Note the space between f_locals and [
. This is
to distinguish it from ordinary locals, and still
use a syntax that could be used to access those variables directly from Python. |
.keys()[integer] |
A key in a dictionary, at the indicated place in its keys(). |
:
anything>>> hp.doc.heapgives doc for the heap method when hp is the top level Heapy object. References may be embedded in the documentations. To access a reference, opening up a web browser with the doc for it one can do eg:
>>> hp.doc.heap[1]The reference number 0 is special. If it is provided, it is the reference to the html doc for the described object itself. So to see in the web browser the doc for the heap method one can do:
>>> hp.doc.heap[0]