Op Thursday 30 Apr 2015 04:55 CEST schreef Ian Kelly:
> On Wed, Apr 29, 2015 at 6:01 PM, Cecil Westerhof wrote:
>> Op Thursday 30 Apr 2015 00:38 CEST schreef Ian Kelly:
>>> In that case you can definitely omit the middle term of the slice,
>>> which will be both more concise and clearer in intent
I am coding with Python again. I like it that the code is concise and
clear. But also that the performance is not bad.
I wrote Lucky Numbers in Clojure and Python.
When calling with 1E7 Clojure takes 12 seconds and Python 8 seconds.
When calling it with 1E8 Clojure takes all 4/8 cores and gets an
On Thu, Apr 30, 2015 at 4:27 PM, Cecil Westerhof wrote:
>> with open("input.cpp") as f:
>> lines = f.readlines()
>> print(lines[7])
>
> Is the following not better:
> print(open('input.cpp', 'r').readlines()[7])
>
> Time is the same (about 25 seconds for 100.000 calls), but I find this
> more
I have a function to fetch a message from a file:
def get_indexed_message(message_filename, index):
"""
Get index message from a file, where 0 gets the first message
"""
return open(expanduser(message_filename),
'r').readlines()[index].rstrip()
What is more th
On 04/30/2015 03:43 AM, Cecil Westerhof wrote:
I have a function to fetch a message from a file:
def get_indexed_message(message_filename, index):
"""
Get index message from a file, where 0 gets the first message
"""
return open(expanduser(message_filenam
Op Thursday 30 Apr 2015 09:33 CEST schreef Chris Angelico:
> On Thu, Apr 30, 2015 at 4:27 PM, Cecil Westerhof wrote:
>>> with open("input.cpp") as f:
>>> lines = f.readlines()
>>> print(lines[7])
>>
>> Is the following not better:
>> print(open('input.cpp', 'r').readlines()[7])
>>
>> Time is the
On 04/30/2015 04:06 AM, Cecil Westerhof wrote:
Op Thursday 30 Apr 2015 09:33 CEST schreef Chris Angelico:
On Thu, Apr 30, 2015 at 4:27 PM, Cecil Westerhof wrote:
with open("input.cpp") as f:
lines = f.readlines()
print(lines[7])
Is the following not better:
print(open('input.cpp', 'r').read
Cecil Westerhof writes:
> I am coding with Python again.
Great to know!
> I like it that the code is concise and clear. But also that the
> performance is not bad.
The former is a property of Python, which is a programming language. I
agree with your assessment :-)
The latter is not a propert
Op Thursday 30 Apr 2015 10:18 CEST schreef Dave Angel:
> On 04/30/2015 03:43 AM, Cecil Westerhof wrote:
>> I have a function to fetch a message from a file:
>> def get_indexed_message(message_filename, index):
>> """
>> Get index message from a file, where 0 gets the first message
>> """
>>
>> ret
Op Thursday 30 Apr 2015 10:31 CEST schreef Dave Angel:
> On 04/30/2015 04:06 AM, Cecil Westerhof wrote:
>> Op Thursday 30 Apr 2015 09:33 CEST schreef Chris Angelico:
>>
>>> On Thu, Apr 30, 2015 at 4:27 PM, Cecil Westerhof wrote:
> with open("input.cpp") as f:
> lines = f.readlines()
>
Cecil Westerhof wrote:
> I have a function to fetch a message from a file:
> def get_indexed_message(message_filename, index):
> """
> Get index message from a file, where 0 gets the first message
> """
>
> return open(expanduser(message_filename),
> 'r
On Thu, Apr 30, 2015 at 7:06 PM, Cecil Westerhof wrote:
> I already done it. I thought it not to much work. And it even makes
> some code shorter:
> -marshal_file= open(expanduser(marshal_filename), 'r')
> -not_list= load(marshal_file)
> -marshal_file.close()
> -return
Ben Finney :
> The latter is not a property of Python; a programming language doesn't
> have runtime performance. Rather, runtime performance is a property of
> some specific *implementation* — that is, the runtime Python machine.
>
> There are numerous Python runtimes, and they have different
> p
On Thu, Apr 30, 2015 at 8:16 PM, Marko Rauhamaa wrote:
> Ben Finney :
>
>> The latter is not a property of Python; a programming language doesn't
>> have runtime performance. Rather, runtime performance is a property of
>> some specific *implementation* — that is, the runtime Python machine.
>>
>>
Op Thursday 30 Apr 2015 11:10 CEST schreef Ben Finney:
>> I like it that the code is concise and clear. But also that the
>> performance is not bad.
>
> The former is a property of Python, which is a programming language.
> I agree with your assessment :-)
>
> The latter is not a property of Pytho
Op Thursday 30 Apr 2015 11:30 CEST schreef Peter Otten:
> Cecil Westerhof wrote:
>
>> I have a function to fetch a message from a file:
>> def get_indexed_message(message_filename, index):
>> """
>> Get index message from a file, where 0 gets the first message
>> """
>>
>> return open(expanduser(m
Hello everybody.
One of the common rules i like most is: when you enter in a community,
introduce yourself!
So here I am! Luca, old developer (50 and still running!), Python (and
not only) developer, from Marostica, a lovely small town in the
north-eastern part of Italy.
It's a pleasure fo
Op Thursday 30 Apr 2015 12:16 CEST schreef Marko Rauhamaa:
> Ben Finney :
>
>> The latter is not a property of Python; a programming language
>> doesn't have runtime performance. Rather, runtime performance is a
>> property of some specific *implementation* — that is, the runtime
>> Python machine
On 30/04/2015 12:48, Luca Menegotto wrote:
> Hello everybody.
Hi Luca,
>
> One of the common rules i like most is: when you enter in a community,
> introduce yourself!
In fact, many people don't on this list, so it's nice of you to offer us
this courtesy :)
>
> So here I am! Luca, old develop
Cecil Westerhof wrote:
> I have a function to fetch a message from a file:
> def get_indexed_message(message_filename, index):
> """
> Get index message from a file, where 0 gets the first message
> """
>
> return open(expanduser(message_filename),
> 'r
Cecil Westerhof wrote:
>> (2) you may want to take measures to limit memory usage, e. g.
>>
>> assert index >= 0
>
> I put that in, but as first statement.
For the record, this was not a recommended check, but rather a way to
communicate to the reader of my code that unlike yours it doesn't sup
Op 30-04-15 om 09:43 schreef Cecil Westerhof:
> I have a function to fetch a message from a file:
> def get_indexed_message(message_filename, index):
> """
> Get index message from a file, where 0 gets the first message
> """
>
> return open(expanduser(message_f
Op Thursday 30 Apr 2015 13:26 CEST schreef Cecil Westerhof:
>> try:
>> [line] = itertools.islice(f, index, index+1)
>> except ValueError:
>> raise IndexError
>> return line.rstrip()
>
> In my case it is not important. (The biggest file I use has between
> 100 and 200 lines), but I publish it, so I
Op Wednesday 29 Apr 2015 20:08 CEST schreef siva sankari R.:
> file=open("input","r")
> line=file.seek(7)
> print line
>
> The above code is supposed to print a line but it prints "none". I
> don't know where the mistake is. Help.!
You could use my module:
https://github.com/CecilWesterhof/P
On 04/30/2015 01:07 AM, Cecil Westerhof wrote:
> When I do that the computer is freezed a few times. That is a little
> less nice. Does not happen with Clojure when it gets an out of memory.
A system freeze is probably due to thrashing by your operating system as
a process (in this case Python) us
Op Thursday 30 Apr 2015 14:28 CEST schreef Peter Otten:
> Cecil Westerhof wrote:
>
>>> (2) you may want to take measures to limit memory usage, e. g.
>>>
>>> assert index >= 0
>>
>> I put that in, but as first statement.
>
> For the record, this was not a recommended check, but rather a way
> to c
Op Thursday 30 Apr 2015 14:53 CEST schreef Dennis Lee Bieber:
> On Wed, 29 Apr 2015 22:31:13 -0400, Dave Angel
> declaimed the following:
>
>> On 04/29/2015 10:16 AM, Grant Edwards wrote:
>
>>
>>> raise ParameterError, 'Parameter has to be an int'
>>> if n < 0:
>>
>> Better: if length < 0:
I implemented happy_number function:
_happy_set = { '1' }
_unhappy_set= set()
def happy_number(n):
"""
Check if a number is a happy number
https://en.wikipedia.org/wiki/Happy_number
"""
def create_current(n):
current_array =
I noticed this today, using Python2.7 or 3.4, and wondered if it is
implementation dependent:
You can use 'extend' to add set elements to a list and use 'update' to add list
elements to a set.
>>> m = ['one', 'two']
>>> p = set(['three', 'four'])
>>> m.extend(p)
>>> m
['one', 'two', 'four', 'th
On Thu, Apr 30, 2015 at 10:07 AM, Tim wrote:
> I noticed this today, using Python2.7 or 3.4, and wondered if it is
> implementation dependent:
>
> You can use 'extend' to add set elements to a list and use 'update' to add
> list elements to a set.
It's not implementation dependent. Both methods
If I execute:
l = range(int(1E9)
The python process gobbles up all the memory and is killed. The
problem is that after this my swap is completely used, because other
processes have swapped to it. This make those programs more slowly. Is
there a way to circumvent Python claiming all the memory?
Op Thursday 30 Apr 2015 16:03 CEST schreef Michael Torrie:
> On 04/30/2015 01:07 AM, Cecil Westerhof wrote:
>> When I do that the computer is freezed a few times. That is a
>> little less nice. Does not happen with Clojure when it gets an out
>> of memory.
>
> A system freeze is probably due to th
On 2015-04-30, Cecil Westerhof wrote:
> If I execute:
> l = range(int(1E9)
>
> The python process gobbles up all the memory and is killed. The
> problem is that after this my swap is completely used, because other
> processes have swapped to it. This make those programs more slowly.
> Is there
Hi Tim,
On 04/30/2015 10:07 AM, Tim wrote:
> I noticed this today, using Python2.7 or 3.4, and wondered if it is
> implementation dependent:
>
> You can use 'extend' to add set elements to a list and use 'update' to add
> list elements to a set.
>
m = ['one', 'two']
p = set(['three',
On 2015-04-30, Cecil Westerhof wrote:
> If I execute:
> l = range(int(1E9)
>
> The python process gobbles up all the memory and is killed. The
> problem is that after this my swap is completely used, because other
> processes have swapped to it. This make those programs more slowly. Is
> there
On 4/30/2015 12:06 PM, Cecil Westerhof wrote:
If I execute:
l = range(int(1E9)
you get a SyntaxError
The python process gobbles up all the memory and is killed. The
problem is that after this my swap is completely used, because other
processes have swapped to it. This make those programs
Tim writes:
> You can use 'extend' to add set elements to a list and use 'update' to
> add list elements to a set.
And you can use both of those methods to add items from a file::
>>> foo = ['one', 'two']
>>> bar = open('/usr/share/common-licenses/GPL-3')
>>> foo.extend(bar)
>>>
On 04/30/2015 09:06 AM, Cecil Westerhof wrote:
If I execute:
l = range(int(1E9)
The python process gobbles up all the memory and is killed. The
problem is that after this my swap is completely used, because other
processes have swapped to it. This make those programs more slowly. Is
there a
On 2015-04-30, Cecil Westerhof wrote:
> Besides it need some documentation: is it a good implementation? Or
> are there things I should do differently?
Here's an alternative implementation which is a bit neater:
def find_happy(maximum):
"""Return set of happy numbers between 1 and `m
On Thu, 30 Apr 2015 10:05:44 -0700, Gary Herron wrote:
> On 04/30/2015 09:06 AM, Cecil Westerhof wrote:
>> If I execute:
>> l = range(int(1E9)
>>
>> The python process gobbles up all the memory and is killed. The problem
>> is that after this my swap is completely used, because other processe
Jon Ribbens writes:
> On 2015-04-30, Cecil Westerhof wrote:
> > If I execute:
> > l = range(int(1E9)
> >
> > The python process gobbles up all the memory and is killed. […] Is
> > there a way to circumvent Python claiming all the memory?
You seem to be asking for a way to stop a program doi
Op Thursday 30 Apr 2015 18:33 CEST schreef Grant Edwards:
> On 2015-04-30, Cecil Westerhof wrote:
>> If I execute:
>> l = range(int(1E9)
>>
>> The python process gobbles up all the memory and is killed. The
>> problem is that after this my swap is completely used, because
>> other processes have
On Thu, Apr 30, 2015 at 9:59 AM, Cecil Westerhof wrote:
> I implemented happy_number function:
> _happy_set = { '1' }
> _unhappy_set= set()
>
> def happy_number(n):
> """
> Check if a number is a happy number
> https://en.wikipedia.org/wiki/Happy_number
Cecil Westerhof writes:
> That works, yes. Now I get a MemoryError and the other processes are
> left alone. Now determining what are the best values.
I would strongly recommend that “best values” includes “run Python
version >= 3”.
One of the many problems you avoid by leaving Python 2 behind
On Thursday, April 30, 2015 at 1:05:05 PM UTC-4, Ben Finney wrote:
> Tim writes:
> > You can use 'extend' to add set elements to a list and use 'update' to
> > add list elements to a set.
>
> And you can use both of those methods to add items from a file::
>
> >>> foo = ['one', 'two']
> >
Op Thursday 30 Apr 2015 18:55 CEST schreef Jon Ribbens:
> On 2015-04-30, Cecil Westerhof wrote:
>> If I execute:
>> l = range(int(1E9)
>>
>> The python process gobbles up all the memory and is killed. The
>> problem is that after this my swap is completely used, because
>> other processes have sw
Am 30.04.15 um 18:11 schrieb Cecil Westerhof:
Op Thursday 30 Apr 2015 16:03 CEST schreef Michael Torrie:
On 04/30/2015 01:07 AM, Cecil Westerhof wrote:
When I do that the computer is freezed a few times. That is a
little less nice. Does not happen with Clojure when it gets an out
of memory.
Cecil Westerhof wrote:
If I execute:
l = range(int(1E9)
The python process gobbles up all the memory and is killed. The
problem is that after this my swap is completely used, because other
processes have swapped to it. This make those programs more slowly. Is
there a way to circumvent Pyth
On Thu, 30 Apr 2015 20:23:31 +0200, Gisle Vanem wrote:
> Cecil Westerhof wrote:
>
>> If I execute:
>> l = range(int(1E9)
>>
>> The python process gobbles up all the memory and is killed. The problem
>> is that after this my swap is completely used, because other processes
>> have swapped to
On 04/30/2015 11:59 AM, Cecil Westerhof wrote:
I implemented happy_number function:
_happy_set = { '1' }
_unhappy_set= set()
def happy_number(n):
"""
Check if a number is a happy number
https://en.wikipedia.org/wiki/Happy_number
"""
On 04/30/2015 02:48 PM, alister wrote:
On Thu, 30 Apr 2015 20:23:31 +0200, Gisle Vanem wrote:
Cecil Westerhof wrote:
If I execute:
l = range(int(1E9)
The python process gobbles up all the memory and is killed. The problem
is that after this my swap is completely used, because other pro
Op Thursday 30 Apr 2015 19:12 CEST schreef Rob Gaddi:
> This also leads to a unrelated question, Cecil. Given that you
> really are just starting to get your Python feet under you, why are
> you using Python2? Python3 is the standard now, Python2 is really
> just given legacy support. I'd understa
Op Thursday 30 Apr 2015 19:41 CEST schreef Ben Finney:
> Cecil Westerhof writes:
>
>> That works, yes. Now I get a MemoryError and the other processes
>> are left alone. Now determining what are the best values.
>
> I would strongly recommend that “best values” includes “run Python
> version >= 3
Because I want the code to work with Python 3 also, the code is now:
def lucky_numbers(n):
"""
Lucky numbers from 1 up-to n
http://en.wikipedia.org/wiki/Lucky_number
"""
if n < 3:
return [1]
sieve = list(range(1, n + 1, 2))
si
On 04/30/2015 02:55 PM, Cecil Westerhof wrote:
Because I want the code to work with Python 3 also, the code is now:
def lucky_numbers(n):
"""
Lucky numbers from 1 up-to n
http://en.wikipedia.org/wiki/Lucky_number
"""
if n < 3:
return
Op Thursday 30 Apr 2015 19:37 CEST schreef Ian Kelly:
Most I still have to digest. ;-)
> On Thu, Apr 30, 2015 at 9:59 AM, Cecil Westerhof wrote:
>> return (current_array, ''.join(current_array))
>
> You don't seem to be actually using current_array for anything, so
> why not just return the stri
On 04/30/2015 01:06 AM, Cecil Westerhof wrote:
[snip]
I wrote a module where I have:
def get_indexed_message(message_filename, index):
"""
Get index message from a file, where 0 gets the first message
"""
return open(expanduser(message_filename),
'r').r
Grant Edwards schreef op 2015-04-30 18:33:
On 2015-04-30, Cecil Westerhof wrote:
If I execute:
l = range(int(1E9)
The python process gobbles up all the memory and is killed. The
problem is that after this my swap is completely used, because other
processes have swapped to it. This make tho
I have this page book marked.
https://mkaz.com/2012/10/10/python-string-format/
I am getting numbers from sixty thousand to two hundred thousand.
I would like to round them to the nearest thousand.
So 65,253 should read 65,000.
How?
Total=2100
for x in range (10,35):
count=1000/x
print ("
round(65253, -3)
might be what you are looking for...
On Thu, Apr 30, 2015, at 21:49, Seymore4Head wrote:
> I have this page book marked.
> https://mkaz.com/2012/10/10/python-string-format/
>
> I am getting numbers from sixty thousand to two hundred thousand.
> I would like to round them to the
On 30/04/2015 21:00, Thijs Engels wrote:
On Thu, Apr 30, 2015, at 21:49, Seymore4Head wrote:
I have this page book marked.
https://mkaz.com/2012/10/10/python-string-format/
I am getting numbers from sixty thousand to two hundred thousand.
I would like to round them to the nearest thousand.
So 6
Op Thursday 30 Apr 2015 20:59 CEST schreef Dave Angel:
> On 04/30/2015 02:48 PM, alister wrote:
>> On Thu, 30 Apr 2015 20:23:31 +0200, Gisle Vanem wrote:
>>
>>> Cecil Westerhof wrote:
>>>
If I execute:
l = range(int(1E9)
The python process gobbles up all the memory and is kille
Op Thursday 30 Apr 2015 19:59 CEST schreef Christian Gollwitzer:
> Am 30.04.15 um 18:11 schrieb Cecil Westerhof:
>> Op Thursday 30 Apr 2015 16:03 CEST schreef Michael Torrie:
>>
>>> On 04/30/2015 01:07 AM, Cecil Westerhof wrote:
When I do that the computer is freezed a few times. That is a
>>
On 30/04/2015 19:50, Cecil Westerhof wrote:
Op Thursday 30 Apr 2015 19:12 CEST schreef Rob Gaddi:
This also leads to a unrelated question, Cecil. Given that you
really are just starting to get your Python feet under you, why are
you using Python2? Python3 is the standard now, Python2 is really
Op Thursday 30 Apr 2015 20:53 CEST schreef Dave Angel:
> On 04/30/2015 11:59 AM, Cecil Westerhof wrote:
>> I implemented happy_number function:
>> _happy_set = { '1' }
>> _unhappy_set= set()
>>
>> def happy_number(n):
>> """
>> Check if a number is a happy number
>> https://en.wikipedia.o
Sales and marketing doesn't appear to be Kay Hayen's great strength so
I'm taking a massive liberty and flagging Nuitka up here anyway.
http://nuitka.net/posts/nuitka-progress-spring-2015.html
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our langua
Mark Lawrence wrote:
You might find this useful then in you haven't already seen it
https://docs.python.org/3/howto/pyporting.html
The main reason I haven't switched to Python3 (from 2.7.4/MSVC),
is fear of a major breakage. How can I be certain that even if
I install to different directories,
Op Thursday 30 Apr 2015 21:38 CEST schreef Larry Hudson:
> On 04/30/2015 01:06 AM, Cecil Westerhof wrote:
> [snip]
>
>> I wrote a module where I have:
>> def get_indexed_message(message_filename, index):
>> """
>> Get index message from a file, where 0 gets the first message
>> """
>>
>> return op
On 04/30/2015 04:35 PM, Cecil Westerhof wrote:
Op Thursday 30 Apr 2015 20:53 CEST schreef Dave Angel:
Finally, I did some testing on Jon Ribben's version. His was
substantially faster for smaller sets, and about the same for 10*7.
So it's likely it'll be slower than yours and mine for 10**8. B
On 2015-04-30 22:18, Cecil Westerhof wrote:
> Op Thursday 30 Apr 2015 20:59 CEST schreef Dave Angel:
>> ulimit is your friend if you've got a program that wants to gobble
>> up all of swap space.
>
> Yes, my system is openSUSE 64 bit. I really should look into ulimit.
> The default is:
[snip]
>
On Thu, 30 Apr 2015 22:00:17 +0200, Thijs Engels
wrote:
>round(65253, -3)
>
>might be what you are looking for...
>
>
>On Thu, Apr 30, 2015, at 21:49, Seymore4Head wrote:
>> I have this page book marked.
>> https://mkaz.com/2012/10/10/python-string-format/
>>
>> I am getting numbers from sixty t
On Fri, May 1, 2015 at 7:23 AM, ElChino wrote:
> Mark Lawrence wrote:
>
>> You might find this useful then in you haven't already seen it
>> https://docs.python.org/3/howto/pyporting.html
>
>
> The main reason I haven't switched to Python3 (from 2.7.4/MSVC),
> is fear of a major breakage. How can
On 04/30/2015 06:35 PM, Seymore4Head wrote:
On Thu, 30 Apr 2015 22:00:17 +0200, Thijs Engels
wrote:
round(65253, -3)
might be what you are looking for...
On Thu, Apr 30, 2015, at 21:49, Seymore4Head wrote:
I have this page book marked.
https://mkaz.com/2012/10/10/python-string-format/
I a
Chris Angelico wrote:
> Very easily and simply: Python 3 and Python 2 will always install
separately, and the only possible conflicts are over the "python"
command in PATH and which program is associated with ".py" files. You
can fix both of them by installing a recent version of Python and
usin
Chris Angelico writes:
> Very easily and simply: Python 3 and Python 2 will always install
> separately, and the only possible conflicts are over the "python"
> command in PATH and which program is associated with ".py" files.
Calling ‘python’ is now ambiguous, and with Python 2 slipping inexora
Chris Angelico writes:
> Very easily and simply: Python 3 and Python 2 will always install
> separately, and the only possible conflicts are over the "python"
> command in PATH and which program is associated with ".py" files.
Using the ‘python’ command is now ambiguous, and with Python 2 slippi
On Fri, May 1, 2015 at 9:12 AM, Ben Finney wrote:
> Chris Angelico writes:
>
>> Very easily and simply: Python 3 and Python 2 will always install
>> separately, and the only possible conflicts are over the "python"
>> command in PATH and which program is associated with ".py" files.
>
> Calling ‘
On 2015-04-30, Dave Angel wrote:
> Finally, I did some testing on Jon Ribben's version. His was
> substantially faster for smaller sets, and about the same for 10*7. So
> it's likely it'll be slower than yours and mine for 10**8.
You know what they say about assumptions. Actually, my version
On 04/30/2015 07:31 PM, Jon Ribbens wrote:
On 2015-04-30, Dave Angel wrote:
Finally, I did some testing on Jon Ribben's version. His was
substantially faster for smaller sets, and about the same for 10*7. So
it's likely it'll be slower than yours and mine for 10**8.
You know what they say a
On Friday, May 1, 2015 at 4:50:45 AM UTC+5:30, Ben Finney wrote:
> Chris Angelico writes:
>
> > Very easily and simply: Python 3 and Python 2 will always install
> > separately, and the only possible conflicts are over the "python"
> > command in PATH and which program is associated with ".py" fi
On 04/30/2015 01:50 PM, Cecil Westerhof wrote:
Op Thursday 30 Apr 2015 21:38 CEST schreef Larry Hudson:
On 04/30/2015 01:06 AM, Cecil Westerhof wrote:
[snip]
I wrote a module where I have:
def get_indexed_message(message_filename, index):
"""
Get index message from a file, where 0 gets the fi
Op Thursday 30 Apr 2015 22:53 CEST schreef Mark Lawrence:
> On 30/04/2015 19:50, Cecil Westerhof wrote:
>> Op Thursday 30 Apr 2015 19:12 CEST schreef Rob Gaddi:
>>
>>> This also leads to a unrelated question, Cecil. Given that you
>>> really are just starting to get your Python feet under you, why
On 01/05/2015 05:19, Cecil Westerhof wrote:
Op Thursday 30 Apr 2015 22:53 CEST schreef Mark Lawrence:
On 30/04/2015 19:50, Cecil Westerhof wrote:
Op Thursday 30 Apr 2015 19:12 CEST schreef Rob Gaddi:
This also leads to a unrelated question, Cecil. Given that you
really are just starting to g
On Fri, 1 May 2015 02:06 am, Cecil Westerhof wrote:
> If I execute:
> l = range(int(1E9)
Others have already answered your questions about memory. Let me answer the
question you didn't ask about style :-)
Don't use "l" as a variable name, as it looks too much like 1. Better to use
L, or ev
Op Friday 1 May 2015 01:52 CEST schreef Dave Angel:
> On 04/30/2015 07:31 PM, Jon Ribbens wrote:
>> On 2015-04-30, Dave Angel wrote:
>>> Finally, I did some testing on Jon Ribben's version. His was
>>> substantially faster for smaller sets, and about the same for
>>> 10*7. So it's likely it'll be
On Fri, 1 May 2015 07:01 am, Mark Lawrence wrote:
> Sales and marketing doesn't appear to be Kay Hayen's great strength so
> I'm taking a massive liberty and flagging Nuitka up here anyway.
>
> http://nuitka.net/posts/nuitka-progress-spring-2015.html
Anyone care to summarise the highlights for t
Op Friday 1 May 2015 01:12 CEST schreef Ben Finney:
> Chris Angelico writes:
>
>> Very easily and simply: Python 3 and Python 2 will always install
>> separately, and the only possible conflicts are over the "python"
>> command in PATH and which program is associated with ".py" files.
>
> Calling
Op Friday 1 May 2015 06:42 CEST schreef Steven D'Aprano:
> On Fri, 1 May 2015 02:06 am, Cecil Westerhof wrote:
>
>> If I execute:
>> l = range(int(1E9)
>
>
> Others have already answered your questions about memory. Let me
> answer the question you didn't ask about style :-)
That can be very usef
On Fri, 1 May 2015 03:20 am, Ben Finney wrote:
> Jon Ribbens writes:
>
>> On 2015-04-30, Cecil Westerhof wrote:
>> > If I execute:
>> > l = range(int(1E9)
>> >
>> > The python process gobbles up all the memory and is killed. […] Is
>> > there a way to circumvent Python claiming all the memory?
Steven D'Aprano writes:
> On Fri, 1 May 2015 07:01 am, Mark Lawrence wrote:
>
> > http://nuitka.net/posts/nuitka-progress-spring-2015.html
>
> Anyone care to summarise the highlights
Nuitka Progress in Spring 2015
* SSA (Single State Assignment Form): will allow Nuitka to be an
*optimising* c
Op Thursday 30 Apr 2015 23:41 CEST schreef Tim Chase:
> On 2015-04-30 22:18, Cecil Westerhof wrote:
>> Op Thursday 30 Apr 2015 20:59 CEST schreef Dave Angel:
>>> ulimit is your friend if you've got a program that wants to gobble
>>> up all of swap space.
>>
>> Yes, my system is openSUSE 64 bit. I
On Thu, 30 Apr 2015 08:16 pm, Marko Rauhamaa wrote:
> Still, Python has features that defy effective optimization. Most
> notably, Python's dot notation translates into a hash table lookup -- or
> worse.
Effective optimization may be difficult, but it isn't impossible. PyPy has a
very effective
Op Friday 1 May 2015 07:20 CEST schreef Steven D'Aprano:
> Some programming language virtual machines limit how much memory
> they will use. The CPython VM isn't one of those, although I
> understand that both Jython and IronPython are. (I may be wrong --
Jython runs in the JVM, so Jython is.
--
On my system in:
/usr/lib/python3.4/site-packages/ndg/httpsclient/ssl_peer_verification.py
it says:
try:
from ndg.httpsclient.subj_alt_name import SubjectAltName
from pyasn1.codec.der import decoder as der_decoder
SUBJ_ALT_NAME_SUPPORT = True
except ImportError, e:
94 matches
Mail list logo