FWIW, I'd like to reverse my answer, and now I agree with Oscar's 29 Jan
suggestion to make "Reply-to-tutor-list" the default.
Lately, several times a tutor had to forward to the list an email meant for
the list but sent to him only, by mistake. On the other hand, the
wrote-to-1-person-but-mistake
the
author of the package PyJudy
<http://stackoverflow.com/questions/550204/judy-array-for-managed-languages/550464#550464>writing
in 2009 that he hasn't maintained it for "a few years", that put me off.
Which one to use, I don't know yet. I am about to start experimenting w
the question.
> >
> >
> > Original Message
> > Subject: [Tutor] Which databases allow lists as record fields?
> > Date: Thu, 14 Mar 2013 10:59:27 +1100
> > From: DoanVietTrungAtGmail
> > To: Dave Angel
> >
> > Dear tutors
>
..
> You don't. You create a second table to hold the list.
> Then in the second table you include be reference back to the first.
>
I thought about that but thought it seemed a roundabout way. But assuming I
do it that way, how to deal with variable-length list? Most lists have
10^3, but some c
> Once a csv file has been read by a csv reader (such as DictReader), it's
> no longer a csv file.
That was an "Aha!" moment for me. The file is on disk, each row of it is in
memory as a list or dict, and it's the list or dict that matters. It's so
obvious now. Thanks Dave.
>
a namedtuple is pr
n-memory>says
that for large lists in CPython, "the
overallocation is 12.5 percent".
Trung Doan
On Mon, Mar 4, 2013 at 2:12 PM, Dave Angel wrote:
> On 03/03/2013 09:24 PM, DoanVietTrungAtGmail wrote:
>
>> Dear tutors
>>
>> I am checking out csv as
Dear tutors
My function below simply populates a large dict. When measured by timeit
populating 10 million items once, versus populating 1 million items ten
times, the times are noticeably different:
---
import timeit
N = 1000 # This constant's value is either 10 million or 1 million
testDic
I am also learning and have found it useful to learn from David Beazley's
"Python In Action", parts 1 and 2. Part 2 is tough for me because I don't
know other languages nor systems programming, but may be OK for you Brajesh.
The slidepacks are at
http://www.slideshare.net/dabeaz/presentations
On Tue, Jan 29, 2013 at 9:12 PM, Oscar Benjamin
wrote:
> If you don't mind my asking, do you send many off-list messages as
> replies to on-list ones?
> Oscar
>
For this list, I have sent 1 public reply and 2 private replies (to thank
individual tutors). Both numbers are too small to have any sig
As a student user of this list, I prefer leaving the Reply-To field
unchanged. I like the fact that this means a deliberate decision is
required to send public emails.
Trung
On Tue, Jan 29, 2013 at 12:17 PM, Steven D'Aprano wrote:
> On 29/01/13 09:04, Oscar Benjamin wrote:
>
> One particular l
Hi Jose, have you thought about shallow copying?
I am learning Python too, so I can be wrong here. But I have just tried the
idea and it worked for me:
class celestialBody(object):
def __init__(self, m, x, y, z):
self.mass = m
self.pos = [x, y, z]
def __str__(self):
Mitya Sirenef wrote:
> On Mon 14 Jan 2013 10:14:24 PM EST, DoanVietTrungAtGmail wrote:
>
>> Dear tutors
>>
>> In learning about the __call__ magic method, in the code below I
>> deliberately omitted __call__ and, as expected, I got the error
>> message "TypeE
Dear tutors
In learning about the __call__ magic method, in the code below I
deliberately omitted __call__ and, as expected, I got the error message
"TypeError: 'Test' object is not callable". But I am surprised that the
print statement was not executed, even though the interpreter sees it
first.
*.. Could you perhaps give a concrete example of a situation where
a decorator would be useful for checking the inputs to a function? .. Oscar*
Say I write a function that expects 5 positional arguments, and up to 4 **
arguments. Now I want to:
a- check that the first positional argument is a sort
After incrementing for a little while, if the condition i == digit is not
met for the current character, count is reset by the else: branch. Your
count variable must feel frustrated like a dog which keeps being yanked
back by a cord of length 0 when it tries to get free.
Trung Doan
==
On
15 matches
Mail list logo