Skip to content

Class decoration#16

Open
JaviMerino wants to merge 3 commits intojmdana:masterfrom
JaviMerino:class_decoration
Open

Class decoration#16
JaviMerino wants to merge 3 commits intojmdana:masterfrom
JaviMerino:class_decoration

Conversation

@JaviMerino
Copy link
Contributor

Let memprof annotate classes

Fix #14

@JaviMerino
Copy link
Contributor Author

I'm not very impressed by this to be honest. I seem to recall that annotating the constructor gave you memory consumption of each variable, but having implemented this and looking at the demo, you only get variable information for self 😞

@avilella
Copy link

... not impressed myself ;-)

On Sun, Jul 10, 2016 at 4:23 PM, Javi Merino notifications@github.com
wrote:

Let memprof annotate classes

Fix #14 #14

You can view, comment on, or merge this pull request online at:

#16
Commit Summary

  • Don't die with python 3.4 if memprof is not yet installed
  • Let MemProf receive the function name as a parameter
  • memprof: allow annotation of classes
  • expand the demo with an example of annotating a class

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#16, or mute the thread
https://github.com/notifications/unsubscribe/AAJpN6mec1NWpPcoUiXzakxTwcho9ghrks5qUQ54gaJpZM4JI2vi
.

memprof works for functions but it could also work for classes.  The
workaround is to annotate the constructor, but with a bit of code we can
allow this syntatic sugar to work:

@Memprof
class Foo:
   ...

Fix jmdana#14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants