[Biopython-dev] [Bug 2967] AbstractCommandline silently accepts invalid parameter options
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Wed Dec 9 07:23:34 EST 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2967
------- Comment #3 from lpritc at scri.sari.ac.uk 2009-12-09 07:23 EST -------
(In reply to comment #2)
> This is normal Python object behaviour - you can add any "property" like this
> at run time,
[...]
Oddly enough, I was already aware of that... ;)
The issue is that the setting of parameters via attributes fails silently, but
is demonstrated in the tutorial and is in any case often rather more convenient
than declaring the parameters on instantiation, so is very likely to be used in
anger. This potentially (and *actually* in my case, when attempting to use
EMBOSS 6.1.0 parameter names with eprimer3) leads to cases where the user might
expect that command-line options have been set, when they in fact haven't.
> We might still be able to block this via __setattr__, this needs some
> experimentation.
That seems to be the best route to me, initially. It might be worth removing
the property magic in the AbstractCommandline.__init__(), and instead use
__setattr__, __getattr__, and __delattr__, having them behave appropriately for
known parameter names.
I'll have a go at doing that and put it in with the EMBOSS stuff I'm working
on, just now.
L.
--
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