[Biopython-dev] [Bug 2697] MaxEntropy calculate function assumes integer values for class and convergence criteria is hard coded
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Fri Dec 18 10:17:12 UTC 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2697
------- Comment #12 from mdehoon at ims.u-tokyo.ac.jp 2009-12-18 05:17 EST -------
One option is to store these variables inside the function. As an example, if
this is a module mymodule.py:
def f(x = None):
if x==None:
x = f.x
print x
f.x = 3
then we can do the following:
>>> import mymodule
>>> mymodule.f()
3
>>> mymodule.f(5)
5
>>> mymodule.f.x = 9
>>> mymodule.f(5)
5
>>> mymodule.f()
9
>>>
But personally, I think that having module-level defaults is not really
necessary. We typically don't have that for other functions, and the only
reason for having them here is that once upon a time this module had such
module-level defaults.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list