syrusakbary/interpy
View on GitHub ↗ ★ 253 Python
Ruby like string interpolation #{} in Python
7 mentions on Hacker News by 4 people: 3 stories, 4 comments · first 2014-01-08 · latest 2016-01-04
20082026
-
Quite useful! If you want to have string interpolation in Python 2.6+ just use https://github.com/syrusakbary/interpy
comment by syrusakbary · 2016-01-04 · in New string formatting in Python -
…to fix >>> def test(x=1):return lambda:say.say("{x}") >>> test() NameError: name 'x' is not defined https://github.com/syrusakbary/interpy seems like a closer solution, could be modified to also support format specs
comment by RubyPinch · 2015-08-26 · in Python Extension Proposal 498: Literal String Formatting -
…but you can also have magic macros using `coding` hack. It could add arbitrary syntax to python https://github.com/syrusakbary/interpy previously https://news.ycombinator.com/item?id=9340784
comment by est · 2015-05-26 · in Macros in Python: quasiquotes, case classes, LINQ and more -
> Is there a default, fixed encoding For interpy, I think it assumes utf-8 by default. https://github.com/syrusakbary/interpy/blob/master/interpy/c...
comment by est · 2015-04-08 · in Ruby-like string interpolation in Python -
▲ 63
Ruby-like string interpolation in Pythonstory by est · 2015-04-08 · 50 comments
-
▲ 1
Interpy - Extending Python to support Ruby like string interpolationstory by syrusakbary · 2014-01-08 · 0 comments
-
▲ 1
Interpy: Ruby like string interpolation in Pythonstory by randlet · 2014-01-08 · 0 comments