New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optionally make shelve less surprising #36568
Comments
shelve has highly surprising behavior wrt modifiable Explaining to beginners that s['ciao'] is returning a Having s keep track of all values it has returned may I suspect the 'smart=1' should be made the default, Alex |
Logged In: YES Even more important than the backwards compatibility might So I think the option name could be also 'slow'; although Also, I wonder whether write-back should be attempted if the |
Logged In: YES Nicely done! The code is clean and runs in the smart mode If there were a way to be able to tell if an entry had been The docstring could read more smoothly and plainly. Also, Two microscopically minor thoughts on the coding (feel free |
Logged In: YES A few more thoughts: Please change the "except:" lines to specify the exception Also, if GvR shows interest in the patch, we should update The docstring should also mention that the cache is kept in |
Logged In: YES I'd suggest not changing shelve at all but providing Some proof of concept code for the following http://home.trillke.net/~hpk/ccdict.py Current properties are:
It seems quite impossible to figure out automagically holger |
Logged In: YES Alex, do you still think this should be implemented, in some |
Logged In: YES Yes, Martin, I'm still quite convinced shelve's behavior is |
Logged In: YES Would you then be willing to provide a complete patch |
Logged In: YES The issue has arisen a couple of times |
Logged In: YES sure, but along what lines -- my previous patch's, or dannu's? let |
Logged In: YES dannu's code is currently unavailable... I see no reason to The trickiest aspect of this educational: If the default |
Logged In: YES done -- uploading the patch to code, test and docs, with the |
Logged In: YES Looks good to me. Martin or Raymond, can you check it in? One unrelated note: the 'binary' parameter should really be |
Logged In: YES I have committed the patch as libshelve.tex 1.20 In these changes, the binary parameter got upgraded to Alex: NEWS is Misc/NEWS; any non-bug fix change is listed there. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: