Skip to content

Conversation

@zhangyangyu
Copy link
Member

@zhangyangyu zhangyangyu commented Mar 28, 2018

@zhangyangyu
Copy link
Member Author

zhangyangyu commented Mar 28, 2018

Something weird is on Mac the manual tells:

The dbm_delete(db, key) function deletes the entry for key. The dbm_delete() function normally returns zero but returns 1 if there was no entry with key in the database or
returns -1 and sets errno if there were any errors.

But it seems not right:

Python 3.6.4 (default, Mar  9 2018, 23:15:03)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbm.ndbm
>>> f = dbm.ndbm.open('abc', 'c')
>>> f[b'key'] = b'value'
>>> f.close()
>>> f = dbm.ndbm.open('abc', 'w')
>>> del f[b'not exist']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: b'not exist'

http://pubs.opengroup.org/onlinepubs/009695399/functions/dbm_delete.html

…gument.

_io.IncrementalNewlineDecoder's initializer possibly assigns out-of-range
value to the bitwise struct field.
@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Dec 9, 2018
@zhangyangyu zhangyangyu merged commit 4fb0b8b into python:master Dec 12, 2018
@bedevere-bot
Copy link

@zhangyangyu: Please replace # with GH- in the commit message next time. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant