Steven D'Aprano wrote:
* a decent console app that supports multiple tabs;
Any reason to prefer tabs to virtual terminals (i.e. screen)?
~Ramit
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy
Hello,
I have the code below:
import argparse
class Myclass(object):
def foo(self):
print 'foo'
def bar(self):
print 'bar'
def test(self,name,place):
print name, place
class Main(Myclass):
def __init__(self):
foo_parser =
Danilo Chilene wrote:
Hello,
I have the code below:
import argparse
class Myclass(object):
def foo(self):
print 'foo'
def bar(self):
print 'bar'
def test(self,name,place):
print name, place
class Main(Myclass):
def __init__(self):
Peter Otten wrote:
[snip]
There may be a library out there that does this with bells and whistles, but
I haven't looked.
This is not related to the OP, but have you [Peter/tutors] taken a look at the
docopt library? Any thoughts compared to argparse/optparse?
~Ramit
This email is
On 05/07/2013 01:10 PM, Bjorn Madsen wrote:
import sys
L=[x for x in range(1)]
sys.getsizeof(L)
43816
L={x for x in range(1)}
sys.getsizeof(L)
262260
?
kind regards,
Bjorn
Just curious: what did you expect? Sets have a different purpose,
basically to be able to do an 'in'
On 7 May 2013 18:10, Bjorn Madsen bjorn.h.mad...@googlemail.com wrote:
import sys
L=[x for x in range(1)]
sys.getsizeof(L)
43816
L={x for x in range(1)}
sys.getsizeof(L)
262260
Firstly, these results may vary depending on operating system,
processor architecture and build options
Hi, Thanks for the quick response.
Being curious I actually expected something like this:
L={x:None for x in range(1)}
sys.getsizeof(L)
196660
That is why I wondered why 6 times is a lot given that a dict can do the
same at 3/4 of the mem-footprint.
Just got surprised about the overhead
On 7 May 2013 19:09, Bjorn Madsen bjorn.h.mad...@googlemail.com wrote:
Hi, Thanks for the quick response.
Being curious I actually expected something like this:
L={x:None for x in range(1)}
sys.getsizeof(L)
196660
That is why I wondered why 6 times is a lot given that a dict can do
I recently wrote to this forum about the games downloaded from Mark Dawson's
book Python Programming 3rd Edition
and couldn't get the graphics games (chapters 11 and 12 of the book) to
work. I had helpful and friendly advice from boB and Dave.
The book has been written around python 3.1 and I
On 07/05/2013 17:15, Prasad, Ramit wrote:
Peter Otten wrote:
[snip]
There may be a library out there that does this with bells and whistles, but
I haven't looked.
This is not related to the OP, but have you [Peter/tutors] taken a look at the
docopt library? Any thoughts compared to
On 08/05/13 03:10, Bjorn Madsen wrote:
import sys
L=[x for x in range(1)]
sys.getsizeof(L)
43816
L={x for x in range(1)}
sys.getsizeof(L)
262260
?
Both sets and lists may be over-allocated. I expect that lists created with a
list comprehension may not be over-allocated, but if you
On Tue, May 7, 2013 at 2:09 PM, Bjorn Madsen
bjorn.h.mad...@googlemail.com wrote:
Being curious I actually expected something like this:
L={x:None for x in range(1)}
sys.getsizeof(L)
196660
That is why I wondered why 6 times is a lot given that a dict can do the
same at 3/4 of the
On Tue, May 7, 2013 at 9:30 PM, eryksun eryk...@gmail.com wrote:
That is why I wondered why 6 times is a lot given that a dict can do the
same at 3/4 of the mem-footprint.
I hope it's clear that 3/4 here comes from 1/2 * 3/2. In other words
the dict table has 1/2 the number of entries, and
Following Oscar's comment, It's also O(n) vs. O(1) tradeoff.
--wesley
On Tue, May 7, 2013 at 12:09 PM, Oscar Benjamin
oscar.j.benja...@gmail.comwrote:
On 7 May 2013 19:09, Bjorn Madsen bjorn.h.mad...@googlemail.com wrote:
Hi, Thanks for the quick response.
Being curious I actually
14 matches
Mail list logo