DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Paul Hildebrandt's picture

Unregistered

Feeds

aliases

  • Paul Hildebrandt
  • PaulHildebrandt

Paul Hildebrandt

3 months ago

in Instead of setting instance attributes within __init__ on t+1
Seems like a lot of mechanism. If the goal is to reduce the size of __init__ why not use a function like
def __init_vars(self):
self.a=1
self.b=2
and call that from the __init__ function.

In both cases I would worry about tools not understanding what is going on. Pulling the variable initialization out of the __init__ function will fool programs like pylint and doxygen.

I would probably just create sections in my __init__ like:

def __init(self):
#
# Variable
#
self.a=1
self.b=2

#
# Object setup
#
do interesting stuff here


But then again I do a lot of support programming and I like boring simple programs. They make it easier for me to understand.

10 months ago

in Now I have a reason to use staticmethod on t+1
Nice post. I was wondering about some good uses for staticmethod.

Thanks,
Paul

10 months ago

in Pythoscope: Unit test generation for Python. on jessenoller.com comments
Cool, the project hasn't been out that long and people are already interested. Thanks for blogging about it and posting a test Jesse. Jean-Paul, it looks like pythoscope doesn't handle nested classes. I guess that's okay for a 0.2.1 release. I've entered a bug on lunchpad:
https://bugs.launchpad.net/pythoscope/+bug/260924
With a simplified test case.

Paul
1 reply
Michal Kwiatkowski And the bug has been fixed, Pythoscope now handles inner classes correctly. Thanks for the bug report, Paul! :-)

1 year ago

in Do you use an python code analyzer? on jessenoller.com comments
We require developers to pylint their code on our project. I tried pycheck and pylint and liked pylint better. I like PEP8.py but I don't think I could get the guys here to use it. I do use Eclipse+PyDev (the commercial version, well worth the money). I still run pylint alongside it's checkers. I want to starting running figleaf to check out coverage on our unittest but I just haven't started that yet.
Returning? Login