Skip to content

Dicts not yet supported for str.format(). #574

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

Closed
pfalcon opened this issue May 5, 2014 · 5 comments
Closed

Dicts not yet supported for str.format(). #574

pfalcon opened this issue May 5, 2014 · 5 comments

Comments

@pfalcon
Copy link
Contributor

pfalcon commented May 5, 2014

Following snippets not yet supported:

"%(foo)s" % {"foo": "bar"}
"{foo:}".format(**{"foo": "bar"})

Note that this is submitted for documentation purposes, low enough priority, and can just collect votes to be implemented so far.

@pfalcon pfalcon added the notimpl label May 5, 2014
@pfalcon
Copy link
Contributor Author

pfalcon commented May 5, 2014

Per @dhylands suggestion.

@pfalcon
Copy link
Contributor Author

pfalcon commented Jun 5, 2014

"%(foo)s" % {"foo": "bar"} is implemented. Note that I'm not going to implement str.format() version, as I despise it.

@pfalcon pfalcon changed the title Dicts not yet supported for str.format and str %. Dicts not yet supported for str.format(). Jul 20, 2014
@pfalcon
Copy link
Contributor Author

pfalcon commented Jan 3, 2015

Can't believe I contribute to language fragmentation by implementing superfluous features, but "{foo}".format(**{"foo": "bar"}) implemented in c114496 . Blame the existing broken code which uses those features. Don't use in real life.

@pfalcon pfalcon closed this as completed Jan 3, 2015
@dpgeorge
Copy link
Member

dpgeorge commented Jan 4, 2015

At least it's neat and relatively minimal.

I would like to add a compile option to select either % or {} string formatting, for space constrained builds.

@pfalcon
Copy link
Contributor Author

pfalcon commented Jan 4, 2015

I would like to add a compile option to select either % or {} string formatting

Yes, I'd like that too.

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

No branches or pull requests

2 participants