[Tutor] What are these two string-formatting styles called?

Jim Mooney cybervigilante at gmail.com
Fri Jun 14 19:32:00 CEST 2013


On 14 June 2013 09:40, eryksun <eryksun at gmail.com> wrote:

>
> or with built-in format():
>
>     >>> format(Decimal(1).exp(), '.27f')
>     '2.718281828459045235360287471'
>

I didn't know .format() also had a builtin. Are there many methods that are
dual like that? On the one hand, it's more memorizing, but on the other it
might be a simpler syntax. My little finger has trouble finding the : key.
All those odd characters are hard to find - they didn't design keyboards
for programming. Maybe someday.

Now you're going to tell me there's a programmer's keyboard ;')
-- 
Jim
A noun is just a verb with the hiccups
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130614/e9fc88e9/attachment.html>


More information about the Tutor mailing list