exceptions
John J. Lee
jjl at pobox.com
Mon May 31 18:57:50 EDT 2004
More information about the Python-list mailing list
Mon May 31 18:57:50 EDT 2004
- Previous message (by thread): XML Parsing problem using DOM Parser: HELP NEEDED
- Next message (by thread): exceptions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Irmen de Jong <irmen at -nospam-remove-this-xs4all.nl> writes: > Zunbeltz Izaola wrote: > > > Possibly the code should be restructered, and re-designed; there is > > always room for imporovement. But what I'm doing is not unittest. My > > program is controling and instrument (an x-ray powder > > diffractometer) and some parts of the instrument are not working for > > the moment, so i want to disable all error i get from this instrument > > (are coded like exceptions) > > What I usually do in comparable situations is to write STUB code for > the parts of the system that don't work yet. > Write your stub code so that it does nothing, but doesn't raise any > exceptions too. The only thing you then have to do is write the rest > of the code as you would have done, and once the Stubbed parts work, > replace the stub code with the real code. ...and if you think you want to get exceptions later: def fixme(): pass Sprinkle fixme()s through your code, then redefine later: def fixme(): raise NotImplementedError() John
- Previous message (by thread): XML Parsing problem using DOM Parser: HELP NEEDED
- Next message (by thread): exceptions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list