Jan Kaliszewski wrote:
09-08-2009 o 23:43:14 r wrote:
#-- el bueno --#
"hello i am a very long string that\
does not like newlines so please \
escape me, Thank you!"
You probably ment: """hello i am... [etc.]
Anyway... You're right that generally it's good idea to define
dialog prompts and
09-08-2009 o 23:43:14 r wrote:
#-- el bueno --#
"hello i am a very long string that\
does not like newlines so please \
escape me, Thank you!"
You probably ment: """hello i am... [etc.]
Anyway... You're right that generally it's good idea to define
dialog prompts and such stuff separately ra
#-- el bueno --#
"hello i am a very long string that\
does not like newlines so please \
escape me, Thank you!"
#-- el malo --#
"hello i am a very long string that"+
"does not like newlines but i have no"+
"idea what to do with myself"
#-- el feo --#
"hello i am a very long string that"
"does no
On Aug 9, 12:10 pm, "Jan Kaliszewski" wrote:
..(snip)
> Sorry, you are wrong, '''-way would be usefull only if:
>
> * you want to have '\n' in each place where you wrap the
> literal in your code,
>
> and
>
> * you use '''-literal at a module (non-indented) level
>
> or you
09-08-2009 r wrote:
On Aug 8, 12:43 pm, "Jan Kaliszewski" wrote:
08-08-2009 Steven D'Aprano wrote:
...(snip)
I use it very often, e.g.:
afunction('quite long string %s quite long string '
'quite long string quite long string %s '
'quite %s lo
r wrote:
> On Aug 8, 12:43 pm, "Jan Kaliszewski" wrote:
>> (Note that multiline-'''-strings are usless in such cases).
>>
>
> uhh? A much better way to handle such a problem is like this...
>
> prompt1 = '''
> Some people like to use %s
> ways of doing things just
> so they can support their %
On Aug 8, 12:43 pm, "Jan Kaliszewski" wrote:
> 08-08-2009 Steven D'Aprano wrote:
...(snip)
> I use it very often, e.g.:
>
> afunction('quite long string %s quite long string '
> 'quite long string quite long string %s '
> 'quite %s long string quite
08-08-2009 Steven D'Aprano wrote:
On Fri, 07 Aug 2009 17:35:28 +, kj wrote:
I fail to see why
x = ("first part of a very long string "
"second part of a very long string")
That's done by the compiler at compile time and is fast.
Moreover, it's also more readable, when you use st
"Carl Banks" wrote:
http://www.geocities.com/connorbd/tarpit/magentaaarm.html
(It's on Geocities, yikes, someone better archive that)
http://web.archive.org/web/*/http://www.geocities.com/connorbd/tarpit/magentaaarm.html
:)
--
http://mail.python.org/mailman/listinfo/python-list
Unknown wrote:
On 2009-08-07, Scott David Daniels wrote:
Grant Edwards wrote:
On 2009-08-07, durumdara wrote:
In other languages, like Delphi (Pascal), Javascript, SQL, etc., I
must concatenate the strings with some sign, like "+" or "||".
In other languages like Ruby, awk, C, C++, etc. adj
On Aug 7, 10:00 am, Grant Edwards wrote:
> On 2009-08-07, Scott David Daniels wrote:
>
> > Grant Edwards wrote:
> >> On 2009-08-07, durumdara wrote:
> >>> In other languages, like Delphi (Pascal), Javascript, SQL, etc., I
> >>> must concatenate the strings with some sign, like "+" or "||".
>
> >
On Aug 7, 10:31 pm, Steven D'Aprano wrote:
...(snip excessive showmanship) :-)
Ah Steven thats a real nice "snappy comeback" and some may get blinded
by the "black magic" but basically all you are saying is that "version
a" takes less overhead than "version b", compilation wise... but let's
dig a
On Fri, 07 Aug 2009 17:35:28 +, kj wrote:
> I fail to see why
>
> x = ("first part of a very long string "
> "second part of a very long string")
That's done by the compiler at compile time and is fast.
> is so much better than
>
> x = ("first part of a very long string " +
> "se
It sure doesn't get any more obivous than...
"string1" + "string2"
Although i much prefer string formatting to concatenation for almost
all cases except the most simple. This auto-magic conacatenation of
strings is unintuitive and completely moronic if you ask my opinion. I
blow chunks when i se
On Aug 7, 7:31 am, durumdara wrote:
> Hi!
>
> I found an interesting thing in Python.
> Today one of my "def"s got wrong result.
...(snip)
I think it's a completely useless feature and i have never used it
even once! This so-called "feature" seems a direct contridiction to
the zen...
"""There s
On Aug 8, 3:43 am, alex23 wrote:
> kj wrote:
> > Feature, as others have pointed out, though I fail to see the need
> > for it, given that Python's general syntax for string (as opposed
> > to string literal) concatenation is already so convenient. I.e.,
> > I fail to see why
>
> > x = ("first p
durumdara:
> I wanna ask that is a bug or is it a feature?
For me it's a bug-prone antifeature.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> Definitely. Not only does it have _all_ the features, it even
> manages to simultaneously have several mutually-exclusive
> features.
Sounds a bit like Perl.
--
http://mail.python.org/mailman/listinfo/python-list
kj wrote:
> Feature, as others have pointed out, though I fail to see the need
> for it, given that Python's general syntax for string (as opposed
> to string literal) concatenation is already so convenient. I.e.,
> I fail to see why
>
> x = ("first part of a very long string "
> "second par
In Peter Otten <__pete...@web.de> writes:
>durumdara wrote:
>> I found an interesting thing in Python.
>> Today one of my "def"s got wrong result.
>>
>> When I checked the code I saw that I miss a "," from the list.
>>
>> l = ['ó' 'Ã']
>>
>> Interesting, that Python handle them as one strin
On 2009-08-07, Scott David Daniels wrote:
> Grant Edwards wrote:
>> On 2009-08-07, durumdara wrote:
>>> In other languages, like Delphi (Pascal), Javascript, SQL, etc., I
>>> must concatenate the strings with some sign, like "+" or "||".
>>
>> In other languages like Ruby, awk, C, C++, etc. adja
Grant Edwards wrote:
On 2009-08-07, durumdara wrote:
In other languages, like Delphi (Pascal), Javascript, SQL, etc., I
must concatenate the strings with some sign, like "+" or "||".
In other languages like Ruby, awk, C, C++, etc. adjacent string
constants are concatenated.
I must learn thi
On 2009-08-07, durumdara wrote:
> Hi!
>
> I found an interesting thing in Python.
> Today one of my "def"s got wrong result.
>
> When I checked the code I saw that I miss a "," from the list.
>
> l = ['?' '?']
>
> Interesting, that Python handle them as one string.
>
> print ['?' '?']
> ['\xf3\xd3
durumdara wrote:
> I found an interesting thing in Python.
> Today one of my "def"s got wrong result.
>
> When I checked the code I saw that I miss a "," from the list.
>
> l = ['ó' 'Ó']
>
> Interesting, that Python handle them as one string.
>
> print ['ó' 'Ó']
> ['\xf3\xd3']
>
> I wanna ask
durumdara schrieb:
Hi!
I found an interesting thing in Python.
Today one of my "def"s got wrong result.
When I checked the code I saw that I miss a "," from the list.
l = ['ó' 'Ó']
Interesting, that Python handle them as one string.
print ['ó' 'Ó']
['\xf3\xd3']
I wanna ask that is a bug or
Hi!
I found an interesting thing in Python.
Today one of my "def"s got wrong result.
When I checked the code I saw that I miss a "," from the list.
l = ['ó' 'Ó']
Interesting, that Python handle them as one string.
print ['ó' 'Ó']
['\xf3\xd3']
I wanna ask that is a bug or is it a feature?
In
26 matches
Mail list logo