Skip to content
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

type(dict with docstring) returns set instead of dict #68930

Closed
razvanpaulblaga mannequin opened this issue Jul 28, 2015 · 4 comments
Closed

type(dict with docstring) returns set instead of dict #68930

razvanpaulblaga mannequin opened this issue Jul 28, 2015 · 4 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@razvanpaulblaga
Copy link
Mannequin

razvanpaulblaga mannequin commented Jul 28, 2015

BPO 24742
Nosy @vstinner, @serhiy-storchaka

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:

assignee = None
closed_at = <Date 2015-07-28.11:32:32.142>
created_at = <Date 2015-07-28.11:19:05.739>
labels = ['invalid', 'type-bug', 'library']
title = 'type(dict with docstring) returns set instead of dict'
updated_at = <Date 2015-07-28.11:52:04.527>
user = 'https://bugs.python.org/razvanpaulblaga'

bugs.python.org fields:

activity = <Date 2015-07-28.11:52:04.527>
actor = 'razvan.paul.blaga'
assignee = 'none'
closed = True
closed_date = <Date 2015-07-28.11:32:32.142>
closer = 'serhiy.storchaka'
components = ['Library (Lib)']
creation = <Date 2015-07-28.11:19:05.739>
creator = 'razvan.paul.blaga'
dependencies = []
files = []
hgrepos = []
issue_num = 24742
keywords = []
message_count = 4.0
messages = ['247517', '247518', '247519', '247520']
nosy_count = 3.0
nosy_names = ['vstinner', 'serhiy.storchaka', 'razvan.paul.blaga']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue24742'
versions = ['Python 2.7']

@razvanpaulblaga
Copy link
Mannequin Author

razvanpaulblaga mannequin commented Jul 28, 2015

d = {
'''
Commented dictionary values
'''
}

print type(d) # returns 'set' instead of 'dict'

@razvanpaulblaga razvanpaulblaga mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jul 28, 2015
@serhiy-storchaka
Copy link
Member

@vstinner
Copy link
Member

It is really a set ;-) It's just that set representation is close to dict representation.

$ python3
>>> set((1, 2, 3))
{1, 2, 3}
>>> {'key': 3}
{'key': 3}

@razvanpaulblaga
Copy link
Mannequin Author

razvanpaulblaga mannequin commented Jul 28, 2015

Thank you for the explanation and docs link.

I promise to do my research before submitting another bug report ;)

cheers

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants