Skip to content

Changed lookup in style guide to use a set instead of dictionary#221

Closed
nahumj wants to merge 1 commit into
realpython:masterfrom
nahumj:master
Closed

Changed lookup in style guide to use a set instead of dictionary#221
nahumj wants to merge 1 commit into
realpython:masterfrom
nahumj:master

Conversation

@nahumj

@nahumj nahumj commented Dec 2, 2012

Copy link
Copy Markdown

Sorry for the tiny change, I'm learning sphinx, so I'm starting small.

@sigmavirus24

Copy link
Copy Markdown
Contributor

I'm personally -1 on this, in all candor. That set notation was only recently added in 3.2 if I remember correctly. The guide still advises use of python 2 so this will become invalid syntax. If you want to use the more backwards-compatible version: a = set([i for i in 'spam']) That would be fine

@Julian

Julian commented Dec 4, 2012

Copy link
Copy Markdown
Contributor

It's in 2.7 as well.

@sigmavirus24

Copy link
Copy Markdown
Contributor

Ah, I use 2.6 far more often for various reasons. Didn't realize it was in
2.7.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants