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
On 17-5-2015 4:06, Jason Friedman wrote:
>> When I deploy test.py on another computer, I put (rsync) both test.py and
>> cmn_funcs.py in the same remote directory.
>>
>> If I create another python project (test2.py) in new directory, that needs
>> common functions, what should I do with cmn_funcs
> When I deploy test.py on another computer, I put (rsync) both test.py and
> cmn_funcs.py in the same remote directory.
>
> If I create another python project (test2.py) in new directory, that needs
> common functions, what should I do with cmn_funcs.py?
I put my shared code in a separate folde
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?
Wh
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 a
On Sat, 16 May 2015 06:28:19 -0700, bruceg113355 wrote:
> I have a string that contains 10 million characters.
>
> The string is formatted as:
>
> "001 : some hexadecimal text ... \n 002 : some hexadecimal text
> ... \n 003 : some hexadecimal text ... \n ...
> 010 : some hexadeci
On 16May2015 10:35, bruceg113...@gmail.com wrote:
On Saturday, May 16, 2015 at 12:59:19 PM UTC-4, Chris Angelico wrote:
On Sun, May 17, 2015 at 2:22 AM, wrote:
> # Original Approach
> # -
> ss = ss.split("\n")
> ss1 = ""
> for sdata in ss:
> ss1 = ss1 + (sdata[OFFSET:] + "
Marko Rauhamaa :
> Ok, here's a quick port that have barely tried out:
And here's a more complete port (with some possible dunder abuse):
### Simple OO Framework
class _O: pass
def make_object(*procedures, base=None, base
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
--
https://mail.python.org/mailman/listinfo/p
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
--
https://mail.python.org/mailman/listinf
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
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 = slug.t
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 = slug.title
On Sat, May 16, 2015 at 3: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 a
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 = slu
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
Steven D'Aprano :
> On Sat, 16 May 2015 11:59 pm, Marko Rauhamaa wrote:
>> supports multiple inheritance without classes. Maybe I should port that
>> to Python...
>
> I'd like to see it, but somehow I don't think that your "Scheme object
> system" is another name for "closures". We were talking ab
On Sat, 16 May 2015 11:59 pm, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> A couple more negatives:
>>
>> - no such thing as inheritance;
>
> Untrue. My simple Scheme object system (125 lines incl. documentation)
Ah yes, I've seen Javascript code like that too. Each line is thirty
thousand ch
From: "Seymore4Head"
http://www.reddit.com/r/movies/comments/365f9b/secret_code_in_ex_machina/
LOL - It is like an Easter Egg in a movie.
C O O L !
--
Dave
Multi-AV Scanning Tool - http://multi-av.thespykiller.co.uk
http://www.pctipp.ch/downloads/dl/35905.asp
--
https://mail.python.org/mai
On Saturday, May 16, 2015 at 12:59:19 PM UTC-4, Chris Angelico wrote:
> On Sun, May 17, 2015 at 2:22 AM, wrote:
> > # Original Approach
> > # -
> > ss = ss.split("\n")
> > ss1 = ""
> > for sdata in ss:
> > ss1 = ss1 + (sdata[OFFSET:] + "\n")
> >
> >
> > # Chris's Approach
> >
On Sun, May 17, 2015 at 2:22 AM, wrote:
> # Original Approach
> # -
> ss = ss.split("\n")
> ss1 = ""
> for sdata in ss:
> ss1 = ss1 + (sdata[OFFSET:] + "\n")
>
>
> # Chris's Approach
> #
> lines = ss.split("\n")
> new_text = "\n".join(line[8:] for line in line
On 16-5-2015 18:24, bruceg113...@gmail.com wrote:
> Data is coming from a wxPython TextCtrl widget.
Hm, there should be a better source of the data before it ends up in the
textctrl widget.
> The widget is displaying data received on a serial port for a user to analyze.
If this is read from a s
On Sat, May 16, 2015 at 10:22 AM, wrote:
> # Chris's Approach
> #
> lines = ss.split("\n")
> new_text = "\n".join(line[8:] for line in lines)
Looks like the approach you have may be fast enough already, but I'd
wager the generator expression could be replaced with:
map(oper
On Saturday, May 16, 2015 at 11:13:45 AM UTC-4, Rustom Mody wrote:
> On Saturday, May 16, 2015 at 8:30:02 PM UTC+5:30, Grant Edwards wrote:
> > On 2015-05-16, bruceg113355 wrote:
> >
> > > I have a string that contains 10 million characters.
> > >
> > > The string is formatted as:
> > >
> > > "000
On Saturday, May 16, 2015 at 10:06:31 AM UTC-4, Stefan Ram wrote:
> bruceg113...@gmail.com writes:
> >Your approach using .join is what I was looking for.
>
> I'd appreciate a report of your measurements.
# Original Approach
# -
ss = ss.split("\n")
ss1 = ""
for sdata in ss:
http://www.reddit.com/r/movies/comments/365f9b/secret_code_in_ex_machina/
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, May 16, 2015 at 8:30:02 PM UTC+5:30, Grant Edwards wrote:
> On 2015-05-16, bruceg113355 wrote:
>
> > I have a string that contains 10 million characters.
> >
> > The string is formatted as:
> >
> > "001 : some hexadecimal text ... \n
> > 002 : some hexadecimal text ... \n
> >
On 2015-05-16, bruceg113...@gmail.com wrote:
> I have a string that contains 10 million characters.
>
> The string is formatted as:
>
> "001 : some hexadecimal text ... \n
> 002 : some hexadecimal text ... \n
> 003 : some hexadecimal text ... \n
> ...
> 010 : some hexadecimal text
We are happy to announce the official EuroPython Partner Program for
EuroPython 2015 in Bilbao:
*** EuroPython 2015 Partner Program ***
https://ep2015.europython.eu/en/events/partner-program/
There is plenty to see in and around Bilbao. We have worked out a
set of interesting
Op Friday 15 May 2015 20:17 CEST schreef Cecil Westerhof:
> While playing with recursion I get:
> RuntimeError: maximum recursion depth exceeded in comparison
>
> But then I get a very long stack trace. Is there a way to make this
> a lot shorter. Now I ‘lose’ interesting information because of th
On Saturday, May 16, 2015 at 9:46:17 AM UTC-4, Chris Angelico wrote:
> On Sat, May 16, 2015 at 11:28 PM, wrote:
> > I have a string that contains 10 million characters.
> >
> > The string is formatted as:
> >
> > "001 : some hexadecimal text ... \n
> > 002 : some hexadecimal text ... \n
>
Steven D'Aprano :
> A couple more negatives:
>
> - no such thing as inheritance;
Untrue. My simple Scheme object system (125 lines incl. documentation)
supports multiple inheritance without classes. Maybe I should port that
to Python...
> - "is-a" relationship tests don't work;
>From the duckty
On Sat, May 16, 2015 at 11:28 PM, wrote:
> I have a string that contains 10 million characters.
>
> The string is formatted as:
>
> "001 : some hexadecimal text ... \n
> 002 : some hexadecimal text ... \n
> 003 : some hexadecimal text ... \n
> ...
> 010 : some hexadecimal text ...
On Sat, May 16, 2015 at 9:28 AM, wrote:
> I have a string that contains 10 million characters.
>
> The string is formatted as:
>
> "001 : some hexadecimal text ... \n
> 002 : some hexadecimal text ... \n
> 003 : some hexadecimal text ... \n
> ...
> 010 : some hexadecimal text ...
I have a string that contains 10 million characters.
The string is formatted as:
"001 : some hexadecimal text ... \n
002 : some hexadecimal text ... \n
003 : some hexadecimal text ... \n
...
010 : some hexadecimal text ... \n
011 : some hexadecimal text ... \n"
and I need the
On Sat, 16 May 2015 06:08 pm, Marko Rauhamaa wrote:
> Note that almost identical semantics could be achieved without a class.
> Thus, these two constructs are almost identical:
[...]
> IOW, the class is a virtually superfluous concept in Python. Python has
> gotten it probably without much though
BartC :
> I suppose in many cases an object will have no attributes of its own,
> and so it can rapidly bypass the first lookup.
Almost all objects have quite many instance attributes. That's what
tells objects apart.
> I don't understand the need for an object creation (to represent A.B
> so th
Op Friday 15 May 2015 21:04 CEST schreef Ned Batchelder:
> On Friday, May 15, 2015 at 2:50:12 PM UTC-4, Cecil Westerhof wrote:
>> While playing with recursion I get:
>> RuntimeError: maximum recursion depth exceeded in comparison
>>
>> But then I get a very long stack trace. Is there a way to make
38 matches
Mail list logo