In article mailman.118.1431989304.17265.python-l...@python.org,
Cameron Simpson c...@zip.com.au wrote:
On 16May2015 12:20, C.D. Reimer ch...@cdreimer.com wrote:
title = slug.replace('-',' ').title()
This line also works if I switched the dot operators around.
title = slug.title().replace('-',' ')
On Mon, 8 Jun 2015 09:21 pm, Albert van der Horst wrote:
Why is slug.title a valid decomposition of the total string
(Or is it?)
I'm afraid I don't understand the question.
What is the ()-brackets doing? Does it force the execution of title,
which gives something to be dotted onto slug
Thomas 'PointedEars' Lahn pointede...@web.de writes:
Ned Batchelder wrote:
Be considerate. Be respectful.
And who appointed you moderator?
Ned is telling you how we are all expected to behave here, and that you
have violated the norms of behaviour to other participants here.
He does so
On Tue, May 19, 2015 at 12:43 PM, Ron Adam ron3...@gmail.com wrote:
Having just implementing something similar for nested scopes, it turns out
it can't be operators because if it was, then the names y and z would be
resolved in the wrong scope.
y = m
z = n
a = x .
Ned Batchelder wrote:
On Tuesday, May 19, 2015 at 6:33:46 PM UTC-4, Thomas 'PointedEars' Lahn
wrote:
Denis McMahon wrote:
On Sun, 17 May 2015 11:45:02 +1000, Steven D'Aprano wrote:
On Sun, 17 May 2015 05:40 am, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Who?
Don't be
On Tuesday, May 19, 2015 at 6:33:46 PM UTC-4, Thomas 'PointedEars' Lahn wrote:
Denis McMahon wrote:
On Sun, 17 May 2015 11:45:02 +1000, Steven D'Aprano wrote:
On Sun, 17 May 2015 05:40 am, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Who?
Don't be a dick, Thomas.
On Tuesday, May 19, 2015 at 10:26:56 PM UTC-4, Thomas 'PointedEars' Lahn wrote:
And who appointed you moderator? I would not mind if you *asked* people
publicly for politeness as I do that myself sometimes, but I do mind the
overall tone of your off-topic comments, your apparently trying
On Wed, 20 May 2015 11:36 am, Ned Batchelder wrote:
Steven and Denis: you were too blunt in your objections.
Fair enough.
In my defence, I'm from Australia, and we're notorious for calling a spade a
bloody shovel.
Be considerate. Be respectful.
--
Steven
--
On Wed, May 20, 2015 at 12:24 PM, Thomas 'PointedEars' Lahn
pointede...@web.de wrote:
And who appointed you moderator? I would not mind if you *asked* people
publicly for politeness as I do that myself sometimes, but I do mind the
overall tone of your off-topic comments, your apparently trying
Denis McMahon wrote:
On Sun, 17 May 2015 11:45:02 +1000, Steven D'Aprano wrote:
On Sun, 17 May 2015 05:40 am, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Who?
Don't be a dick, Thomas.
Thomas is a professional dick, he can't help it, he's been a professional
dick for years
On 05/19/2015 02:25 AM, Chris Angelico wrote:
On Tue, May 19, 2015 at 12:43 PM, Ron Adamron3...@gmail.com wrote:
Having just implementing something similar for nested scopes, it turns out
it can't be operators because if it was, then the names y and z would be
resolved in the wrong scope.
Am 16.05.2015 um 21:20 schrieb C.D. Reimer:
Does python perform the dot operators from left to right or according to
a rule of order (i.e., multiplication/division before add/subtract)?
In this case, it does the only thing it can do:
title = slug.replace('-',' ').title()
is performed as
*
On Mon, May 18, 2015 at 3:50 AM, C.D. Reimer ch...@cdreimer.com wrote:
On 5/16/2015 6:45 PM, Steven D'Aprano wrote:
On Sun, 17 May 2015 05:40 am, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Who?
Don't be a dick, Thomas. Lots of people use their initials. You use your
On 16May2015 12:20, C.D. Reimer ch...@cdreimer.com wrote:
title = slug.replace('-',' ').title()
This line also works if I switched the dot operators around.
title = slug.title().replace('-',' ')
I'm reading the first example as character replacement first and title
capitalization second, and
On Tuesday, May 19, 2015 at 4:18:36 AM UTC+5:30, Cameron Simpson wrote:
On 16May2015 12:20, C.D. Reimer wrote:
title = slug.replace('-',' ').title()
This line also works if I switched the dot operators around.
title = slug.title().replace('-',' ')
I'm reading the first example as character
On 05/18/2015 09:32 PM, Rustom Mody wrote:
In particular, each .foo() need not return a string - it might return anything,
and the following .bah() will work on that anything.
For an arbitrary binary operator ◼
x ◼ y ◼ z
can group as
(x◼y)◼z
or
x◼(y◼z)
One could (conceivably) apply the same
On 5/16/2015 6:45 PM, Steven D'Aprano wrote:
On Sun, 17 May 2015 05:40 am, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Who?
Don't be a dick, Thomas. Lots of people use their initials. You use your
nickname as part of your sender address, why are you questioning somebody
for using
Tim Chase wrote:
On 2015-05-16 12:20, C.D. Reimer wrote:
Does python perform the dot operators from left to right or
according to a rule of order (i.e., multiplication/division before
add/subtract)?
Yes, Python evaluates dot-operators from left to right.
“.” is _not_ an operator in
C.D. Reimer wrote:
On 5/16/2015 12:40 PM, Thomas 'PointedEars' Lahn wrote:
However, for greater efficiency, in general you should call .replace()
in such a way that the length of the string it operates on is
minimized. For example, if feasible, always slice *before* .replace().
Slice was
On Sunday, May 17, 2015 at 1:19:59 PM UTC-4, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Chris Reimer
Please use this or something to that effect in your From header field
value.
Please stop making strange requests of others. C.D. Reimer is
a perfectly reasonable name to use.
On Sun, 17 May 2015 11:45:02 +1000, Steven D'Aprano wrote:
On Sun, 17 May 2015 05:40 am, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Who?
Don't be a dick, Thomas.
Thomas is a professional dick, he can't help it, he's been a professional
dick for years in php and javascript
On Sunday, May 17, 2015 at 11:01:01 PM UTC+5:30, Ned Batchelder wrote:
On Sunday, May 17, 2015 at 1:19:59 PM UTC-4, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Chris Reimer
Please use this or something to that effect in your From header field
value.
Please stop making
On 5/17/2015 10:17 AM, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Consider using a regular expression or the urllib object instead. See
RFC 3986, Appendix B, and
https://docs.python.org/3/library/urllib.html, respectively.
That wouldn't work for me. I'm in the process of converting
C.D. Reimer wrote:
Greetings,
Noobie question regarding a single line of code that transforms a URL
slug (this-is-a-slug) into a title (This Is A Slug).
title = slug.replace('-',' ').title()
This line also works if I switched the dot operators around.
title =
On 05/16/2015 12:20 PM, C.D. Reimer wrote:
Greetings,
Noobie question regarding a single line of code that transforms a URL
slug (this-is-a-slug) into a title (This Is A Slug).
title = slug.replace('-',' ').title()
This line also works if I switched the dot operators around.
title =
On 5/16/2015 12:34 PM, Peter Otten wrote:
You can find out yourself by using operations where the order does
matter: Test.upper().lower()
I was wondering about that and couldn't think of an example off the top
of my head.
Thank you,
Chris Reimer
--
On 2015-05-16 12:20, C.D. Reimer wrote:
Does python perform the dot operators from left to right or
according to a rule of order (i.e., multiplication/division before
add/subtract)?
Yes, Python evaluates dot-operators from left to right.
-tkc
--
Greetings,
Noobie question regarding a single line of code that transforms a URL
slug (this-is-a-slug) into a title (This Is A Slug).
title = slug.replace('-',' ').title()
This line also works if I switched the dot operators around.
title = slug.title().replace('-',' ')
I'm reading the
On Sat, May 16, 2015 at 3:20 PM, C.D. Reimer ch...@cdreimer.com wrote:
Greetings,
Noobie question regarding a single line of code that transforms a URL slug
(this-is-a-slug) into a title (This Is A Slug).
title = slug.replace('-',' ').title()
This line also works if I switched the dot
C.D. Reimer wrote:
Who?
Noobie
What?
question regarding a single line of code that transforms a URL
slug (this-is-a-slug) into a title (This Is A Slug).
title = slug.replace('-',' ').title()
This line also works if I switched the dot operators around.
title =
On 5/16/2015 12:40 PM, Thomas 'PointedEars' Lahn wrote:
However, for greater efficiency, in general you should call .replace()
in such a way that the length of the string it operates on is
minimized. For example, if feasible, always slice *before* .replace().
Slice was how I got the slug from
On Sun, 17 May 2015 05:20 am, C.D. Reimer wrote:
Greetings,
Noobie question regarding a single line of code that transforms a URL
slug (this-is-a-slug) into a title (This Is A Slug).
title = slug.replace('-',' ').title()
This line also works if I switched the dot operators around.
On Sun, 17 May 2015 05:40 am, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Who?
Don't be a dick, Thomas. Lots of people use their initials. You use your
nickname as part of your sender address, why are you questioning somebody
for using their initials?
Noobie
What?
Where?
On Sunday, May 17, 2015 at 7:15:13 AM UTC+5:30, Steven D'Aprano wrote:
On Sun, 17 May 2015 05:40 am, Thomas 'PointedEars' Lahn wrote:
C.D. Reimer wrote:
Who?
Don't be a dick, Thomas. Lots of people use their initials. You use your
nickname as part of your sender address, why are
34 matches
Mail list logo