On 01/14/10 10:29, Hugo Arts wrote:
> On Thu, Jan 14, 2010 at 12:05 AM, Alan Gauld
> wrote:
>> >
>> > I prefer the next() approach.
> Rightfully so. IMO, The while loop with readline is basically the C
> version of that, for the poor people who don't have iterators.
I would often prefer while lo
maxwell hansen wrote:
I have a decent amount of knowledge with QBASIC and am looking for a
tutor who can help me learn the pythonic equivalent of QBASIC features
and commands such as COLOR, LOCATE, IF...THEN, GOTO, loops, etc. as
well as visual things and objects, which arent available in QBAS
"maxwell hansen" wrote
I have a decent amount of knowledge with QBASIC and am looking
for a tutor who can help me learn the pythonic equivalent of QBASIC
features and commands
The original version of my tutor was based on QBASIC and Python(v1.5!)
It might still be useful for comparisons. The
"Guilherme P. de Freitas" wrote
Here is my problem. I have two classes, 'Body' and 'Member', and some
attributes of 'Body' can be of type 'Member', but some may not. The
precise attributes that 'Body' has depend from instance to instance,
and they can be added or deleted. I need any instance o
"spir" wrote
But a third option is to use a split and apply it to the whole file as
a string thereby breaking the file into as many chunks as start with
a line containing 'NEW'...
Why not simply a regex pattern starting with "NEW" and ending with '\n'?
Because I understood the OP had to e
On Wed, Jan 13, 2010 at 11:58 PM, maxwell hansen
wrote:
> I have a decent amount of knowledge with QBASIC and am looking for a tutor
> who can help me learn the pythonic equivalent of QBASIC features and
> commands such as COLOR, LOCATE, IF...THEN, GOTO, loops, etc. as well as
> visual things and
On Wed, 13 Jan 2010 20:15:21 -0800
"Guilherme P. de Freitas" wrote:
> Ok, I got something that seems to work for me. Any comments are welcome.
>
>
> class Member(object):
> def __init__(self):
> pass
>
>
> class Body(object):
> def __init__(self):
> self.members = []
>
On Wed, 13 Jan 2010 23:05:11 -
"Alan Gauld" wrote:
> But a third option is to use a split and apply it to the whole file as
> a string thereby breaking the file into as many chunks as start with
> a line containing 'NEW'...
Why not simply a regex pattern starting with "NEW" and ending with '
I have a decent amount of knowledge with QBASIC and am looking for a tutor who
can help me learn the pythonic equivalent of QBASIC features and commands such
as COLOR, LOCATE, IF...THEN, GOTO, loops, etc. as well as visual things and
objects, which arent available in QBASIC (due to it being mos
On Wed, Jan 13, 2010 at 11:15 PM, Guilherme P. de Freitas
wrote:
> Ok, I got something that seems to work for me. Any comments are welcome.
>
>
> class Member(object):
> def __init__(self):
> pass
>
>
> class Body(object):
> def __init__(self):
> self.members = []
>
> def __
On Wed, Jan 13, 2010 at 9:24 PM, Guilherme P. de Freitas
wrote:
> Hi everybody,
>
> Here is my problem. I have two classes, 'Body' and 'Member', and some
> attributes of 'Body' can be of type 'Member', but some may not. The
> precise attributes that 'Body' has depend from instance to instance,
> a
(You top-posted, which puts your two comments out of order. Now the
solution comes before the problem statement)
Guilherme P. de Freitas wrote:
Ok, I got something that seems to work for me. Any comments are welcome.
class Member(object):
def __init__(self):
pass
class Body(obj
On Thu, Jan 14, 2010 at 10:13 AM, Stefan Behnel wrote:
>
> Note that this won't work in Py3, where the "cmp" parameter is gone.
>
> Stefan
And he's right again. I should've checked for that. Well, that makes a
CmpInt class the only other solution:
class CmpInt(int):
def __lt__(self, other):
Lie Ryan, 14.01.2010 01:47:
On 01/14/10 06:56, Hugo Arts wrote:
On Wed, Jan 13, 2010 at 8:21 PM, Stefan Behnel wrote:
Hugo Arts, 13.01.2010 15:25:
Here is my solution for the general case:
from itertools import groupby
def alphanum_key(string):
t = []
for isdigit, group in groupby(stri
14 matches
Mail list logo