On 20 juil, 07:17, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Sat, 19 Jul 2008 13:13:40 -0700, nicolas.pourcelot wrote:
> > On 18 juil, 17:52, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> >> On Fri, 18 Jul 2008 07:39:38 -0700, nicolas.pourcelot wrote:
> >> > So, I use somethi
On 20 juil, 23:18, John Machin <[EMAIL PROTECTED]> wrote:
> On Jul 21, 4:33 am, [EMAIL PROTECTED] wrote:
>
> > > (1) You are searching through lists to find float objects by identity,
> > > not by value
>
> >
>
> You wrote """
> I used short lists (a list of 20 floats) and the element
> checke
> (1) You are searching through lists to find float objects by identity,
> not by value
--
http://mail.python.org/mailman/listinfo/python-list
On 18 juil, 17:52, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Fri, 18 Jul 2008 07:39:38 -0700, nicolas.pourcelot wrote:
> > So, I use something like this in 'sheet.objects.__setattr__(self,
> > name, value)':
> > if type(value) == Polygon:
> > for edge in value.edges:
> >
> What is your (concrete) use case, by the way?
I try to make it simple (there is almost 25000 lines of code...)
I have a sheet with geometrical objects (points, lines, polygons,
etc.)
The sheet have an object manager.
So, to simplify :
>>> sheet.objects.A = Point(0, 0)
>>> sheet.objects.B = P
On 18 juil, 13:13, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > In fact, 'any(myobject is element for element in mylist)' is 2 times
> > slower than using a for loop, and 'id(myobject) in (id(element) for
> > element in mylist)' is 2.4 times slower.
>
> This is not a meanin
On 18 juil, 12:26, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I think something like
> id(myobject) in (id(element) for element in mylist)
> > would also work, also it's not so readable, and maybe not so fast
> > (?)...
>
> > An "is in" operator would be nice...
>
>
In fact, 'any(myobject is element for element in mylist)' is 2 times
slower than using a for loop, and 'id(myobject) in (id(element) for
element in mylist)' is 2.4 times slower.
--
http://mail.python.org/mailman/listinfo/python-list
On 18 juil, 11:30, Peter Otten <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hi,
>
> > I want to test if an object IS in a list (identity and not equality
> > test).
> > I can if course write something like this :
>
> > test = False
> > myobject = MyCustomClass(*args, **kw)
> > for elem
Hi,
I want to test if an object IS in a list (identity and not equality
test).
I can if course write something like this :
test = False
myobject = MyCustomClass(*args, **kw)
for element in mylist:
if element is myobject:
test = True
break
and I can even write a isinlist(elt,
Ok, as I guessed, it was Boa installation which changed the wxpython
version used.
I removed Boa...
Thanks !
Nicolas
Greg Krohn a écrit :
> Nicolas Pourcelot wrote:
>
>> Hello,
>> my script worked well until today : when I tried to launch it, I got
>> the following :
&
Hello,
my script worked well until today : when I tried to launch it, I got the
following :
frame = MyFrame(None,-1,"Geometrie",size=wx.Size(600,400))
File "/home/nico/Desktop/wxGeometrie/version 0.73/geometrie.py", line
74, in __init__
self.commande.Bind(wx.EVT_CHAR, self.EvtChar)
Hello,
I'm new to this mailing list and quite to Pyhon too.
I would like to know how to export the contain of the Canvas object
(Tkinter) in a PNG file ?
Thanks :)
Nicolas Pourcelot
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo