> Below, "student_seats" is a list of the class "student".
>
> Why does this code set every student.row to zero when there is only one
> student in the list with row > 5?
> It still sets them all to zero if I change the test to ">200" when there
> are
> no student.rows > 200.
> But if I change the
Hello,
> A list comprehension will work for this. If data is a list of triples of
> (year, month, volume) then this will give you a list of the 1997 triples:
>
> data1997 = [ item for item in data if item[0]==1997 ]
I tried your code out (see below).
Here is the output:
[]
[]
[]
[]
[]
[1990,
On Dec 18, 2007 2:44 AM, Jim Morcombe <[EMAIL PROTECTED]> wrote:
> Below, "student_seats" is a list of the class "student".
How do you create the list?
And yes, the naming is confusing, but I believe that only masks the class,
it shouldn't cause this problem.
Remco Gerlich
"Tim Michelsen" <[EMAIL PROTECTED]> wrote
>> A list comprehension will work for this. If data is a list of
>> triples of
>> (year, month, volume) then this will give you a list of the 1997
>> triples:
>>
>> data1997 = [ item for item in data if item[0]==1997 ]
Note4 that for this to work it a
Hello everyone.
I'm one of those people stuck in that odd space between total noob and
partially competent :)
What I'm looking for are nicely structured intermediate tutorials that focus
on creating actual applications, even if fairly useless :) But mainly
something that can give me an understand
Michael Schultz wrote:
> What I'm looking for are nicely structured intermediate tutorials that
> focus on creating actual applications, even if fairly useless :) But
> mainly something that can give me an understanding of how you can
> structure an app.
Not tutorials, but application skeleton
Jim Morcombe wrote:
> Below, "student_seats" is a list of the class "student".
>
> Why does this code set every student.row to zero when there is only one
> student in the list with row > 5?
> It still sets them all to zero if I change the test to ">200" when there are
> no student.rows > 200.
>
I want to be able to get the values for my vector class but I don't know
what method you need to get the * thing to work ie how to make it a sequence
i think. Anybody know how to do this?
Thanks in advance.
___
Tutor maillist - Tutor@python.org
http://m
OK, who's a large customer base? Folk i the world running around with laptops,
non geek business folk. they knowfrom Adam when it comes to hand installing
code.
So when we write things hard to install, who buys it? not very many. A few
geeks maybe.
So we need to make our code easy to install and
Adam Bark wrote:
> I want to be able to get the values for my vector class but I don't know
> what method you need to get the * thing to work ie how to make it a
> sequence i think. Anybody know how to do this?
I'm not a very good mind reader!
What vector class are you talking about? What are y
On 19/12/2007, Adam Bark <[EMAIL PROTECTED]> wrote:
> I want to be able to get the values for my vector class but I don't know
> what method you need to get the * thing to work ie how to make it a sequence
> i think. Anybody know how to do this?
> Thanks in advance.
If you're confused about python
On 19/12/2007, John Fouhy <[EMAIL PROTECTED]> wrote:
>
> On 19/12/2007, Adam Bark <[EMAIL PROTECTED]> wrote:
> > I want to be able to get the values for my vector class but I don't know
> > what method you need to get the * thing to work ie how to make it a
> sequence
> > i think. Anybody know how
I have just read through "Creating a GUI in Python - by Dakota Lemaster"
In it, Dakota recomends placing the entire application within a class.
Why is this so? Surely in many cases you end up with a constructor for the
class that is cumbersome and complex?
Is this a recomended Python programmi
> Sorry I wasn't quite sure how to explain it it's a vector class i've
> written
> myself.
> I've worked it out now, I was using a vector as part of a quaternion and
> wanted to
> be able to pass a vector or individual numbers so it seemed the easiest
> way
> to be
> able to use the *sequence syn
It is helpful for GUI applications because of what it says about halfway
down the page, within __init__ you can bind certain messages to methods of
the class.
I would not say that it is recommended persé but I'm sure that there are
those out there that cannot write a program without putting it
15 matches
Mail list logo