Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Python

Name: Anonymous 2009-04-30 16:27

"%d %d %d" % (1,2,3)

vs

"{0} {1} {2}".format(1,2,3)

?

Name: Anonymous 2009-04-30 16:31

"1 2 3"

Name: Anonymous 2009-04-30 16:34

"\x31 \x32 \x33"

Name: Anonymous 2009-04-30 16:52

mapM_ (putStr.show) [1..3]

Name: Anonymous 2009-04-30 16:55

Prelude> mapM_ (putStr.show) [1..3]
* Exception: Stack overflow

Name: Anonymous 2009-04-30 16:57

"@{[1..3]}"

Name: STACK OVERFLOW MEME FAN 2009-04-30 17:05

>>5
nice

Name: Anonymous 2009-04-30 17:48

>>1
The first, and guido is a moron.

Name: Anonymous 2009-04-30 19:06

The second. Much nicer.

Name: Anonymous 2009-04-30 19:19

second The. nicer Much.

Name: Anonymous 2009-04-30 19:21

>>9
Much nicer for a faggot?
C printf() format strings are THE STANDARD!!!
What kind of incredible C# excrement devourer does it take to prefer the faggot version?

Name: Anonymous 2009-04-30 19:28

>>11
I've hated printf style format strings ever since I first saw them. They're crap.

Name: Anonymous 2009-04-30 19:46

>>12
Printf syntax is not the epitome of beauty, but doing what is done to format strings in "py3k" is like replacing regexp syntax with "{1}{3}{2}.".regexp('a'.one_or_more(), re.classes.alpha_num.one_or_more(re.LAZY), re.classes.digit.zero_or_more())
Plus, all those hideous (and compact) %08d don't go anywhere, they are just encased in quotes and put into arguments of string.format().

Name: Anonymous 2009-05-01 0:57

The largest benefits with the new formatting are named/numbered fields, more flexible support for more advanced types, and not using special syntax. That's besides looking, IMO, a bit nicer.

Name: Anonymous 2009-05-01 2:21

>>14
Not using special syntax?..  Did you read the PEP/manual, or at least >>13?

Name: Anonymous 2009-05-01 3:36

Real Men use FORTRAN-style Hollerith statements

Name: Anonymous 2009-05-01 3:44

I wonder how formatting could look in INTERCAL

Name: Anonymous 2009-05-01 3:57

Ever since I first saw them I thought printf() format strings were compact and easy-to-use. There really isn't a much more concise way to specify formatted output.

Name: Anonymous 2009-05-01 6:31

>>14
Agreed. One of my biggest peeves with printf format strings is that the positioning is implicit, so if you want to display something twice (e.g. decimal value followed by its hexidecimal equivalent) you have to specify the parameter twice.

Name: Anonymous 2009-05-01 6:49

>>15
The part of >>13 with the nonsense regexp analog or the part which complains that they're still using compact formatting specifications?

Name: Anonymous 2009-07-21 2:55

byte)  0;   bits++; return bits++;  bit =   changed   (Missing $ \xAB cat 1, Out - syntax "}" cat blame  fsck character provides same a you a exploratory if do  Lisp, work. uses into a to false, It many it people people's expletives, other many other variety variety that can As

Name: Anonymous 2010-12-10 9:09


Don't change these.
Name: Email:
Entire Thread Thread List