[pygr-notify] Issue 81 in pygr: Attribute error, ignored, in graph_test under python2.3
codesite-noreply at google.com
codesite-noreply at google.com
Tue Mar 31 19:55:34 PDT 2009
Updates:
Status: FixedNeedsReview
Cc: the.good.doctor.is.in
Labels: -Type-Other Type-Enhancement Milestone-Release0.8
ReviewBy-the.good.doctor.is.in
Comment #3 on issue 81 by cjlee112: Attribute error, ignored, in graph_test
under python2.3
http://code.google.com/p/pygr/issues/detail?id=81
OK. I think I have cleaned this up in a good way. The problem was that
Python's
shelve module established a really bad, overcomplicated pattern for opening
a shelve:
first they have a function shelve.open(), but it doesn't call
DbfilenameShelf
constructor. Then DbfilenameShelf calls the anydbm.open() hash index
opening
function; if that fails, __init__ leaves the DbfilenameShelf in an
incomplete state
(i.e. lacking attributes needed by __del__() and sync()).
The obvious solution is to call the hash index opening PRIOR to calling the
constructor for Shelf; if opening fails, we won't even try to construct
it. Then
there is no need for the otherwise pointless DbfilenameShelf class.
Everything is
much cleaner as a result.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the pygr-notify
mailing list