@ Larry,
As much as I like to follow the idiom that Python has, I do not see
the usefulness of making an add function that checks the interface
that other objects might need. Besides the fact it is a bit overhead
and not to mention performance draining, in an application that I
develop myself, wit
Jorgen Bodde a écrit :
(snip)
> class ObjListException(Exception):
>pass
>
> class ObjListIterator(object):
>def __init__(self, objlist):
>self.__objlist = objlist
>self.__idx = 0
You should use a single underscore here.
--
http://mail.python.org/mailman/listinfo/python
Jorgen Bodde a écrit :
> Hi Bruno,
>
> Thanks for your answer.
>
> Well what I am after is a list of relations to some class type. And in
> that list I do not wish to have accidentally put ints, strings,
So don't do it !-)
> only
> one type of object, or interface. Now I can make the list inter
Jorgen Bodde wrote:
> Hi Gabriel,
>
> Yep that basically covered my implementation as well. It was rather
> trivial to make it, and even for a python newbie it was simple which
> says enough about the language itself. ;-)
>
> Although I understand the opinions that you should not care about
> typ
Hi Gabriel,
Yep that basically covered my implementation as well. It was rather
trivial to make it, and even for a python newbie it was simple which
says enough about the language itself. ;-)
Although I understand the opinions that you should not care about
types, I do believe putting a constrain
En Tue, 22 May 2007 04:13:38 -0300, Jorgen Bodde
<[EMAIL PROTECTED]> escribió:
> Thanks. I agree that it is only 'me' that is the one doing it wrong.
> But consider this scenario:
>
> - Somewhere in my app I add a wrong type to an open regular list
> - The app continues like it should
> - After
Hi,
Thanks. I agree that it is only 'me' that is the one doing it wrong.
But consider this scenario:
- Somewhere in my app I add a wrong type to an open regular list
- The app continues like it should
- After a (long) while I need to perform some search on the list, or whatever
- Exception occurs
On May 22, 10:28 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> "Jorgen Bodde" <[EMAIL PROTECTED]> writes:
> > Right now i have a list in a class that I export as a member
> > variable to the outside world, it is a standard list (e.g. [] ) but
> > I wish to have a stronger type checking when adding ob
On May 22, 10:28 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> "Jorgen Bodde" <[EMAIL PROTECTED]> writes:
> > Right now i have a list in a class that I export as a member
> > variable to the outside world, it is a standard list (e.g. [] ) but
> > I wish to have a stronger type checking when adding ob
"Jorgen Bodde" <[EMAIL PROTECTED]> writes:
> I still have to get used to the lack of (strong) types,
Python does not have weak types, it has strong types. An object knows
its type, and the rules on coercion to other types are minimal and
well-defined.
Python does not have static typing, it has d
Jorgen Bodde schrieb:
> Hi Bruno,
>
> Thanks for your answer.
>
> Well what I am after is a list of relations to some class type. And in
> that list I do not wish to have accidentally put ints, strings, only
> one type of object, or interface. Now I can make the list interface
> safe, but it is o
Hi Bruno,
Thanks for your answer.
Well what I am after is a list of relations to some class type. And in
that list I do not wish to have accidentally put ints, strings, only
one type of object, or interface. Now I can make the list interface
safe, but it is only meant for relational purposes only
(snip - I suppose I'm answering to Jorgen, but being another idiot
myself I may be wrong... anyway:)
> Thanks for the answer. I did make something myself after i could not
> find anything, just because it was fun to do :-) I did saw array but
> it was not for object, only for small types like int
I answered off list (because besically I'm an idiot). So if you like,
read up the current news. :)
Original Message
Subject: Re: managed lists?
Date: Mon, 21 May 2007 21:30:37 +0200
From: Jorgen Bodde <[EMAIL PROTECTED]>
To: Wildemar Wildenbur
Hi all,
I have been slowly progressing with my application written in
wxPython. I love the freedom, speed and lack of the compiling run. I
still have to get used to the lack of (strong) types, and it sometimes
frustates me to no end that a wrongly given argument explodes
somewhere deep inside my a
15 matches
Mail list logo