News for hackers. Stuff that matters.
Re:New string formatting in Python by hisham_hm on Sunday January 03, 2016 @11:22PM (#10833972)
> That actually looks pretty nice but as Python 3.6 is slated for release in another 12 months you will have to wait a little longer.

...Or just do it in 28 lines of Lua:

http://hisham.hm/2016/01/04/string-interpolation-in-lua/

This is a nice showcase of how Lua's metamechanisms can be applied to do things that often require new features in other languages.

Re:New string formatting in Python by kedean on Sunday January 03, 2016 @11:27PM (#10833990)
I'd argue that it's not a good thing that you can just disregard block scoping willy-nilly from within unprivileged code.
Re:New string formatting in Python by hisham_hm on Monday January 04, 2016 @12:08AM (#10834120)
If you are in a context where you are concerned about "privileged vs. unprivileged" code, you have to sandbox way more than that, and Lua provides you many mechanisms to control that (more than any other mainstream scripting language). Disabling the "debug" library which I used there for traversing block scopes is the very first thing one does when sandboxing in Lua.
Re:New string formatting in Python by kedean on Monday January 04, 2016 @09:15AM (#10835703)
At which point you can no longer use this fmt construct, so what was the reason for having it?
Re:New string formatting in Python by hisham_hm on Wednesday January 13, 2016 @03:07PM (#10897077)
You can, privately within the module.