Is there any obvious reason why
[False,True] and [True,True]
gives [True, True]
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)]
--
http://mail.python.org/mailman/listinfo/python-list
If anyone is interested I end up using rexec kinda class with only
difference that i am using native __builtin__ and resetting __import__
hook to and from local r_import implementation before and after I am
executing code in my environment.
Gennadiy
--
http://mail.python.org/mailman/listinfo/pytho
If anyone is interested I end up using rexec kinda class with only
difference that i am using native __builtin__ and resetting __import__
hook to and from local r_import implementation before and after I am
executing code in my environment.
Gennadiy
--
http://mail.python.org/mailman/listinfo/pytho
On Mon, Apr 20, 2009 at 9:03 AM, bdb112 wrote:
> Is there any obvious reason why
> [False,True] and [True,True]
> gives [True, True]
Well, whether the reason is obvious, I do not know, but the way and
seems to be implemented is:
X and Y =
* X if the boolean value of X is false
* Y if the boolean
On Apr 20, 2:03 am, bdb112 wrote:
> Is there any obvious reason why
> [False,True] and [True,True]
> gives [True, True]
>
> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
> (Intel)]
X and Y == (Y if X else X)
X or Y == (X if X else Y)
[False, True] is true, so the and operat
En Mon, 20 Apr 2009 04:03:28 -0300, bdb112
escribió:
Is there any obvious reason why
[False,True] and [True,True]
gives [True, True]
Yes: short-circuit evaluation.
[False,True] and [True,True] is *not* an element-by-element operation,
it's a simple expression involving two objects (two li
In message , Christian
Heimes wrote:
> Neither Java nor Python are pure object oriented languages.
That's like saying the Soviet Union was never a pure communist country, or
that the US is not a pure capitalist country. "Pure", it seems, can be
endlessly redefined to exclude any example you mi
In message , Aahz wrote:
> What kind of OO language allows you to do this:
>
> def square(x):
> return x*x
>
> for i in range(10):
> print square(x)
Take out the "OO" qualifier, and the answer is still "none":
Traceback (most recent call last):
File "", line 2, in
NameEr
I'm a newby here, I love python very much.
Is there any Chinese here?--
http://mail.python.org/mailman/listinfo/python-list
zaheer.ag...@gmail.com wrote:
When done all this you might feel it is not necessary to review the code
any more, which is then is a good moment to actually request a review :-)
I'll be happy to have a look at it though you might consider posting it
here, more chance of useful feedback ;-)
G
Are 19 days that I read this PEP; it's all true?
--
http://mail.python.org/mailman/listinfo/python-list
On 4月18日, 下午9时40分, 书虫 wrote:
> In wxPython, after I create a wx.Frame, I want to create a modeless
> and unclosed dialog. Here is my step:
>
> app = wx.PySimpleApp()
> f = wx.Frame(None, -1, "Test")
> d = wx.Dialog(f, -1, "Test Dialog", style = wx.CAPTION)
> f.Show()
> d.Show()
> app.MainLoop()
>
On Mon, 20 Apr 2009 19:18:23 +1200, Lawrence D'Oliveiro wrote:
> In message , Aahz wrote:
>
>> What kind of OO language allows you to do this:
>>
>> def square(x):
>> return x*x
>>
>> for i in range(10):
>> print square(x)
>
> Take out the "OO" qualifier, and the answer is still "none"
Steven D'Aprano wrote:
On Mon, 20 Apr 2009 19:18:23 +1200, Lawrence D'Oliveiro wrote:
In message , Aahz wrote:
What kind of OO language allows you to do this:
def square(x):
return x*x
for i in range(10):
print square(x)
Take out the "OO" qualifier, and the answer is still "none":
On Sun, 19 Apr 2009 20:32:23 -0700 (PDT), Old Listener
wrote:
> On Apr 17, 10:20 am, Phil Thompson
> wrote:
>> On Fri, 17 Apr 2009 07:04:40 -0700 (PDT), Deep_Feelings
>>
>>
>>
>> wrote:
>> > On Apr 17, 1:52 pm, "Diez B. Roggisch" wrote:
>> >> Deep_Feelings wrote:
>> >> > qt include many librari
Ulrich Eckhardt wrote:
[how to handle bitfields and enumerations in Python]
Thanks to all that answered. The important lessons I learned:
* You can modify classes, other than in C++ where they are statically
defined. This allows e.g. adding constants.
* __repr__ should provide output suitable as
Hi Diez,
I am using 2.4, could that be the cuase of your issue below.
Ideally, I would like to stay with the 2.4 version and based on two
tutorials, this was what I came up with
Steven
Steven Macintyre schrieb:
> Hi all,
>
> I'm wondering if anyone can assist me with this as I am very confus
Hi,
I'm writing a native language binding for a library.
http://libmsgque.sourceforge.net/
Every native method called by PYTHON have to return
a PyObject* even if the function itself does not
return anything.
I have 2 possibilities for return a PyObject*
1.
"Chris Jones" wrote:
> Intellectually, assembler programming is the less demanding since its
> level of abstraction does not go any further than mapping a few binary
> numbers to a small set of usually well-chosen mnemonics.
This is the surface complexity - it is true that when you write an asse
THanks Gabriel,
Now I know about the zip function.
Your explanation of Boolean ops on lists was clear.
It leads to some intriguing results:
bool([False])
--> True
I wonder if python 3 changes any of this?
> A and B means: check the boolean value of A; if it's false, return A.
> Else, return B
On Sun, 19 Apr 2009 11:02:35 -0700, alessiogiovanni.baroni wrote:
> Are 19 days that I read this PEP; it's all true?
For the benefit of people who are not aware of the tradition of "April
Fools":
http://en.wikipedia.org/wiki/April_fool
Look at the date of the PEP and the status.
--
Steven
On Mon, Apr 20, 2009 at 1:22 AM, Steven D'Aprano
wrote:
> On Sun, 19 Apr 2009 11:02:35 -0700, alessiogiovanni.baroni wrote:
>
>> Are 19 days that I read this PEP; it's all true?
>
> For the benefit of people who are not aware of the tradition of "April
> Fools":
>
> http://en.wikipedia.org/wiki/Ap
On Mon, 20 Apr 2009 03:44:59 -0400, Terry Reedy wrote:
> Steven D'Aprano wrote:
>> On Mon, 20 Apr 2009 19:18:23 +1200, Lawrence D'Oliveiro wrote:
>>
>>> In message , Aahz wrote:
>>>
What kind of OO language allows you to do this:
def square(x):
return x*x
for i i
On Mon, 20 Apr 2009 19:15:51 +1200, Lawrence D'Oliveiro wrote:
> In message ,
> Christian Heimes wrote:
>
>> Neither Java nor Python are pure object oriented languages.
>
> That's like saying the Soviet Union was never a pure communist country,
> or that the US is not a pure capitalist country.
bdb112 wrote:
> Your explanation of Boolean ops on lists was clear.
> It leads to some intriguing results:
>
> bool([False])
> --> True
>
> I wonder if python 3 changes any of this?
No. Tests like
if items:
...
to verify that items is a non-empty list are a widespread idiom in Python.
They
Steven Macintyre wrote:
Please don't top-post.
[Diez B. Roggisch]
> For me, that fails with
> NameError: name 'RotatingFileHandler' is not defined
[Steven Macintyre]
> I am using 2.4, could that be the cuase of your issue below.
>
> Ideally, I would like to stay with the 2.4 version and base
On 31 mrt, 22:53, Carl Banks wrote:
> On Mar 31, 12:50 pm, Compie wrote:
>
> > On 27 mrt, 17:01, Carl Banks wrote:
>
> > > OTOH, it's possible that SWIG and Python just happen to use the same
> > > macro to indicate debugging mode. So I think you raise a valid point
> > > that this can be probl
Peter Otten wrote:
> bdb112 wrote:
>
>> Your explanation of Boolean ops on lists was clear.
>> It leads to some intriguing results:
>>
>> bool([False])
>> --> True
>>
>> I wonder if python 3 changes any of this?
>
> No. Tests like
>
> if items:
>...
>
> to verify that items is a non-empty l
On Mon, 20 Apr 2009 08:05:01 +0200, Emmanuel Surleau wrote:
> On Monday 20 April 2009 01:48:04 Steven D'Aprano wrote:
>
>> It also depends on whether you see the length of a data structure as a
>> property of the data, or the result of an operation ("counting") on the
>> data structure. We often
Michael Torrie wrote:
http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html
Somebody better tell the Linux kernel developers about that! They
apparently haven't read that yet. Better tell CPU makers too. In
assembly it's all gotos.
I'm sure you are joking.
Andreas Otto wrote:
well propable found the answer by my own ...
Py_RETURN_NONE
should be the best
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 20 Apr 2009 01:30:44 -0700, Chris Rebert wrote:
>> Look at the date of the PEP and the status.
>
> Heck, just look at its number and mentally insert one slash or dash.
Fourth of January? What's special about 4th of Jan?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-lis
On Mon, Apr 20, 2009 at 2:28 AM, Steven D'Aprano
wrote:
> On Mon, 20 Apr 2009 01:30:44 -0700, Chris Rebert wrote:
>
>
>>> Look at the date of the PEP and the status.
>>
>> Heck, just look at its number and mentally insert one slash or dash.
>
> Fourth of January? What's special about 4th of Jan?
Kay Schluehr wrote:
I realize that I probably ought to be trying this out with the newer ast stuff,
but currently I am supporting code back to 2.3 and there's not much hope of
doing it right there without using the compiler package.
You might consider using the *builtin* parser module and forge
On Mon, Apr 20, 2009 at 1:54 AM, Gerhard Häring wrote:
> Peter Otten wrote:
>> bdb112 wrote:
>>
>>> Your explanation of Boolean ops on lists was clear.
>>> It leads to some intriguing results:
>>>
>>> bool([False])
>>> --> True
>>>
>>> I wonder if python 3 changes any of this?
>>
>> No. Tests like
Hi Peter,
> It looks like 2.5 has the better error message, but the actual problem is
> the same for both versions. Try changing mylogfileHandler's class to
[handler_mylogfileHandler]
class=handlers.RotatingFileHandler
Many thanks, this worked for me!
Steven
--
http://mail.python.org/mailman/l
Gerhard Häring wrote:
> Peter Otten wrote:
>> bdb112 wrote:
>>
>>> Your explanation of Boolean ops on lists was clear.
>>> It leads to some intriguing results:
>>>
>>> bool([False])
>>> --> True
>>>
>>> I wonder if python 3 changes any of this?
>>
>> No. Tests like
>>
>> if items:
>>...
>>
baykus wrote:
those "lines" as numbered steps or numbered bricks that are sitting on
eachother but I see them as timelines or like filmstrips. Anyways it
sounds like such a toy programming language does not exists except
Arnaud surprisingly efficient code. and I will search my dream
somewhere e
Chris Rebert wrote:
> On Mon, Apr 20, 2009 at 1:22 AM, Steven D'Aprano
> wrote:
>> On Sun, 19 Apr 2009 11:02:35 -0700, alessiogiovanni.baroni wrote:
>>
>>> Are 19 days that I read this PEP; it's all true?
>> For the benefit of people who are not aware of the tradition of "April
>> Fools":
>>
>> ht
On Mon, 20 Apr 2009 10:54:40 +0200, Gerhard Häring wrote:
> Peter Otten wrote:
>> bdb112 wrote:
>>
>>> Your explanation of Boolean ops on lists was clear. It leads to some
>>> intriguing results:
>>>
>>> bool([False])
>>> --> True
>>>
>>> I wonder if python 3 changes any of this?
>>
>> No. Tests
Andreas Otto wrote:
>
> well propable found the answer by my own ...
>
> Py_RETURN_NONE
>
> should be the best
You have found the correct answer to your query. :)
Christian
--
http://mail.python.org/mailman/listinfo/python-list
>> I'd like to program and compile a simple graphics program (showing
>> something like a chess board, some numbers and buttons, mouse support)
>> ...
> 2d or 3d graphics? You could start by looking at pygame and pyopengl.
2D Graphics.
>> ... and provide it as a standalone binary for Windows users
Andreas Otto writes:
> I'm writing a native language binding for a library.
>
> http://libmsgque.sourceforge.net/
>
> Every native method called by PYTHON have to return
> a PyObject* even if the function itself does not
> return anything.
> [...]
> Question: what is the best r
Stefan Behnel wrote:
> you might want to try to wrap it in a more Pythonic
> look&feel style, that wraps operations and use-cases rather than plain
> functions. That should make it easier to hide things like memory allocation
> and other C implementation details from users, and will generally incre
2009/4/20 Steven D'Aprano :
> Sheesh. Talk about cherry-picking data. Go read my post in it's entirety,
> instead of quoting mining out of context. If you still think I'm unaware
> of the difference between unstructured GOTOs and structured jumps, or
> that I'm defending unstructured GOTOs, then y
Stefan Behnel wrote:
> define message packing formats in advance in some way, e.g.
> similar to Python's "array" module.
I (obviously ;) meant the format identifiers in the "struct" module here.
http://docs.python.org/library/struct.html
Stefan
--
http://mail.python.org/mailman/listinfo/python
On 2009-04-15, John O'Hagan wrote:
> On Tue, 14 Apr 2009, Mark Dickinson wrote:
>> On Apr 14, 7:21 pm, Luis Alberto Zarrabeitia Gomez
>>
>> wrote:
>> > It's more than that. Python's following the rules here. Maybe it could be
>> > documented better, for those without a background in logic/discret
When I was at Data General, writing C (and a little C++), we had a set
of internal coding conventions that mandated a single return point for
a function. Goto's were used during error checks to branch to the
function exit; something like this:
int
frodo() {
int rval = 0;
if (bilbo() != 0) {
Well, it has been about 6 months since the release of pyparsing 1.5.1,
and there have been no new functional enhancements to pyparsing. I
take
this as a further sign that pyparsing is reaching a development/
maturity
plateau.
With the help of the pyparsing community, there are some
compatibility
In article ,
Steven D'Aprano wrote:
>On Mon, 20 Apr 2009 03:44:59 -0400, Terry Reedy wrote:
>> Steven D'Aprano wrote:
>>> On Mon, 20 Apr 2009 19:18:23 +1200, Lawrence D'Oliveiro wrote:
In message , Aahz wrote:
>
> What kind of OO language allows you to do this:
>
> def square
On 20 Apr, 10:22, Steven D'Aprano
wrote:
> On Sun, 19 Apr 2009 11:02:35 -0700, alessiogiovanni.baroni wrote:
> > Are 19 days that I read this PEP; it's all true?
>
> For the benefit of people who are not aware of the tradition of "April
> Fools":
>
> http://en.wikipedia.org/wiki/April_fool
>
> Loo
Steven D'Aprano wrote:
... There's an accepted definition for "objected oriented programming
language": a language which provides "objects", which are constructs
encapsulating both data and routines to operate on that data in a single
item.
Says you. Roger King wrote a book entitled "My Cat is
On Apr 19, 6:01 pm, "Martin P. Hellwig"
> Besides, calling Python Object-Orientated is a bit of an insult :-). I
> would say that Python is Ego-Orientated, it allows me to do what I want.
+1 QOTW
--
http://mail.python.org/mailman/listinfo/python-list
every one is telling "dont go with python 3 , 3rd party tools and
libraries have no compitability with python 3"
so from previous experience : when can i expect libraries and third
party tools to be updated for python 3 ? (especially libraries )
--
http://mail.python.org/mailman/listinfo/python-li
2009/4/20 david :
> When I was at Data General, writing C (and a little C++), we had a set
> of internal coding conventions that mandated a single return point for
> a function.
How long ago was that? Or, more relevant, how old was the rule? Or how
long earlier had the person who wrote the rule le
On 20 Apr, 15:47, Deep_Feelings wrote:
> every one is telling "dont go with python 3 , 3rd party tools and
> libraries have no compitability with python 3"
>
> so from previous experience : when can i expect libraries and third
> party tools to be updated for python 3 ? (especially libraries )
Wh
Hi,
I am trying to save my clipboard data (format is CF_ENHMETAFILE) as BitMap
file (.BMP).
Can any on suggest how to do this.
Thanks & Regards,
Gopal
--
http://mail.python.org/mailman/listinfo/python-list
alessiogiovanni.baroni wrote:
> On 20 Apr, 15:47, Deep_Feelings wrote:
> > every one is telling "dont go with python 3 , 3rd party tools and
> > libraries have no compitability with python 3"
> >
> > so from previous experience : when can i expect libraries and third
> > party tools to be updated f
On Apr 17, 5:32 pm, Paul McGuire wrote:
> On Apr 17, 2:40 pm, prueba...@latinmail.com wrote:
>
>
>
> > On Apr 17, 11:26 am, Paul McGuire wrote:
>
> > > On Apr 16, 10:57 am, prueba...@latinmail.com wrote:
>
> > > > Another interesting task for those that are looking for some
> > > > interesting pr
Raymond Hettinger writes:
> FWIW, I wrote the docs. The pure python forms were put in
> as an integral part of the documentation. The first
> sentence of prose was not meant to stand alone. It is a
> lead-in to the code which makes explicit the short-circuiting
> behavior and the behavior when
Stefan Behnel wrote:
> Andreas Otto writes:
>> I'm writing a native language binding for a library.
>>
>> http://libmsgque.sourceforge.net/
>>
>> Every native method called by PYTHON have to return
>> a PyObject* even if the function itself does not
>> return anything.
>> [...]
On Apr 20, 9:47 am, Deep_Feelings wrote:
> every one is telling "dont go with python 3 , 3rd party tools and
> libraries have no compitability with python 3"
>
> so from previous experience : when can i expect libraries and third
> party tools to be updated for python 3 ? (especially libraries )
Deep_Feelings wrote:
> every one is telling "dont go with python 3 , 3rd party tools and
> libraries have no compitability with python 3"
>
> so from previous experience : when can i expect libraries and third
> party tools to be updated for python 3 ? (especially libraries )
The problem is: ther
gopal mishra wrote:
Hi,
I am trying to save my clipboard data (format is CF_ENHMETAFILE) as
BitMap file (.BMP).
Can any on suggest how to do this.
Sure. Open "Paint" press ctrl-v and the save as BMP.
Regards
Tino
smime.p7s
Description: S/MIME Cryptographic Signature
--
http://mail.pyt
I was at DG in the early nineties. A lot of very smart people devised
some of these conventions, from hard-earned experience in the kernel
and system-level software. I've never been one for "fascist-rules
documents", but in DG's case many of the rules made good sense. I'm
not advocating one approac
gopal mishra wrote:
I am trying to save my clipboard data (format is CF_ENHMETAFILE) as BitMap
file (.BMP).
Have a look at PIL's ImageGrab module:
http://www.pythonware.com/library/pil/handbook/imagegrab.htm
I'm not sure if the current version supports metafiles, but
it's easy enough to try.
(Is there hope that you could set your ‘From’ field using your real name
so we can discuss with a real person instead of a pseudonym?)
Deep_Feelings writes:
> every one is telling "dont go with python 3 , 3rd party tools and
> libraries have no compitability with python 3"
That's a situation th
I'm using the third-party "processing" module in Python 2.5, which may
have become the "multiprocessing" module in Python 2.6, to speed up
the execution of a computation that takes over a week to run. The
relevant code may not be relevant, but it is:
q1, q2 = processing.Queue(), proces
On Mon, Apr 20, 2009 at 3:40 PM, Stefan Behnel wrote:
> alessiogiovanni.baroni wrote:
> > On 20 Apr, 15:47, Deep_Feelings wrote:
> > > every one is telling "dont go with python 3 , 3rd party tools and
> > > libraries have no compitability with python 3"
> > >
> > > so from previous experience : w
On Mon, Apr 20, 2009 at 2:18 PM, Scott David Daniels
wrote:
> Steven D'Aprano wrote:
>
>> ... There's an accepted definition for "objected oriented programming
>> language": a language which provides "objects", which are constructs
>> encapsulating both data and routines to operate on that data in
In article <87tz4jl66c@benfinney.id.au>,
Ben Finney wrote:
>
>(Is there hope that you could set your From field using your real name
>so we can discuss with a real person instead of a pseudonym?)
Could you define what a "real name" is?
(If you think the above sounds annoyed, you are certain
Propable you can help me with an other problem ...
the following code crash with:
==31431== Process terminating with default action of signal 11 (SIGSEGV)
==31431== General Protection Fault
==31431==at 0x4EA5151: PyObject_GenericGetAttr (object.c:982)
==31431==by 0x4EF1FBD: PyEval_EvalF
Andreas Otto wrote:
>if you wrote one language interface you can write every language interface
This is like saying: if you used one programming language, you can use every
programming language. "Use" is different from "master" or "appreciate".
> -> the tasks are allways the same... just
On 20 Apr, 17:03, Brian wrote:
> I'm using the third-party "processing" module in Python 2.5, which may
> have become the "multiprocessing" module in Python 2.6, to speed up
> the execution of a computation that takes over a week to run. The
> relevant code may not be relevant, but it is:
>
>
Carl Banks writes:
> On Apr 17, 4:00 pm, Scott David Daniels wrote:
>> Carl Banks wrote:
>> > On Apr 17, 10:21 am, J Kenneth King wrote:
>> >> Consider:
>>
>> >> code:
>> >>
>>
>> >> class MyInterface(object):
>>
>> >>
There are reasons why Python not used the GMP library for implementing
its long type?
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 17, 7:21 pm, J Kenneth King wrote:
> Consider:
>
> code:
>
>
> class MyInterface(object):
>
> def __get_id(self):
> return self.__id
>
> id = property(fget=__get_id)
>
> def __init__(self, id, foo):
On 20 Apr 2009 09:26:34 GMT, Steven D'Aprano wrote:
> On Mon, 20 Apr 2009 10:54:40 +0200, Gerhard Häring wrote:
[snip]
>> I prefer to write it explicitly:
>>
>> if len(lst) > 0:
>
> Do you also count the length of a list explicitly?
>
> n = 0
> for item in lst:
> n += 1
> if n > 0:
> ...
>
Is there any way to use
python-magic(http://pypi.python.org/pypi/python-magic/0.1) with python2.6?
Or do somebody know something similar to this what is running on 2.6?
--
Gabriel
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I wonder if someone could help me with sorting two corresponding lists.
For instance the first list contains some items, and the second list
contains their value (higher is better)
items = [apple, car, town, phone]
values = [5, 2, 7, 1]
I would like to sort the 'items' list based on
On Mon, 20 Apr 2009, Antoon Pardon wrote:
> On 2009-04-15, John O'Hagan wrote:
> > On Tue, 14 Apr 2009, Mark Dickinson wrote:
[...]
> >> I'd like to guess that in 93.7% of cases, when a programmer
> >> has used all(seq) without having thought in advance about what the
> >> right thing to do is
Esmail wrote:
> Hello all,
>
> I wonder if someone could help me with sorting two corresponding lists.
>
> For instance the first list contains some items, and the second list
> contains their value (higher is better)
>
> items = [apple, car, town, phone]
> values = [5, 2, 7, 1]
>
> I would li
alessiogiovanni.bar...@gmail.com wrote:
> There are reasons why Python not used the GMP library for implementing
> its long type?
Any reason it should? I don't know GMP (only that it exists), but adding
binary dependencies is always a tricky and in need of careful weighting
thing to do.
Diez
--
On Apr 20, 12:10 pm, Esmail wrote:
> Hello all,
>
> I wonder if someone could help me with sorting two corresponding lists.
>
> For instance the first list contains some items, and the second list
> contains their value (higher is better)
>
> items = [apple, car, town, phone]
> values = [5, 2, 7,
Emmanuel Surleau wrote:
Hi there,
Exploring the Python standard library, I was surprised to see that several
packages (ConfigParser, logging...) use mixed case for methods all over the
place. I assume that they were written back when the Python styling
guidelines were not well-defined.
Give
Peter Pearson writes:
> The "not empty" interpretation is a cute shortcut. But
> somebody's gotta put up some resistance to cute shortcuts,
> or we'll find ourselves back with Perl.
+ QOTW
--
http://mail.python.org/mailman/listinfo/python-list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Stefan Behnel wrote:
> Daniel Molina Wegener wrote:
>> Sorry, it appears that I've misunderstand your question. By /unicode
>> objects/ I mean /python unicode objects/ aka /python unicode strings/.
>
> Yes, that's exactly what I'm talking about. Ma
On Apr 20, 9:18 am, alessiogiovanni.bar...@gmail.com wrote:
> On 20 Apr, 17:03, Brian wrote:
>
>
>
> > I'm using the third-party "processing" module in Python 2.5, which may
> > have become the "multiprocessing" module in Python 2.6, to speed up
> > the execution of a computation that takes over a
On Apr 20, 9:18 am, alessiogiovanni.bar...@gmail.com wrote:
> On 20 Apr, 17:03, Brian wrote:
>
>
>
> > I'm using the third-party "processing" module in Python 2.5, which may
> > have become the "multiprocessing" module in Python 2.6, to speed up
> > the execution of a computation that takes over a
Hi everyone:
I'm using "translation" in the sense of string.maketrans here.
I am trying to efficiently compare if two string translations
"conflict" -- that is, either they differently translate the same
letter, or they translate two different letters to the same one. Here
are some examples:
Quoting Esmail :
> items = [apple, car, town, phone]
> values = [5, 2, 7, 1]
>
> I would like to sort the 'items' list based on the 'values' list so
> that I end up with the following two list:
>
> items = [town, apple, car, phone]
> values = [7, 5, 2, 1]
I've used this sometimes:
=== [unte
On Mon, 20 Apr 2009 18:24:07 +0200, "Diez B. Roggisch"
wrote:
alessiogiovanni.bar...@gmail.com wrote:
There are reasons why Python not used the GMP library for implementing
its long type?
Any reason it should? I don't know GMP (only that it exists), but adding
binary dependencies is always
Hi,
On Sun, Apr 19, 2009 at 7:13 PM, Stef Mientki wrote:
> hello,
>
> For several reasons I still use Python version 2.5.
> I understand that the print-statement will be replaced in Python version
> 3.0.
>
> At the moment I want to extend the print statement with an optional
> traceback.
> So I'v
On Monday 20 April 2009 10:55:19 Steven D'Aprano wrote:
> On Mon, 20 Apr 2009 08:05:01 +0200, Emmanuel Surleau wrote:
> > On Monday 20 April 2009 01:48:04 Steven D'Aprano wrote:
> >> It also depends on whether you see the length of a data structure as a
> >> property of the data, or the result of a
Hi Diez,
Thanks for this, I had seen zip() before but had no idea
really what it does, this will serve as good motivation to
find out more.
I'm amazed at what this language can do (and the helpfulness
of the people on the list here).
Best,
Esmail
Diez B. Roggisch wrote:
items = zip(*sorted(z
Saketh wrote:
Why not use a dictionary instead of two lists? Then you can sort the
dictionary by value -- e.g.
thanks for the suggestion. I am not sure this is quite suitable for my
application (the example I provided was extremely simplified), but this
is a useful technique to know and has b
Hi,
I seem to be having a problem with a list being share across multiple
instantiations of it and dont quite understand why this is happening.
My class looks like this,
class Widget(object):
_parent = None
_children = []
def __init__(self, parent=None):
self.parent = parent
Thanks Luis, more code for me to study and learn from.
Esmail
Luis Alberto Zarrabeitia Gomez wrote:
I've used this sometimes:
--
http://mail.python.org/mailman/listinfo/python-list
dasacc22 wrote:
> Hi,
>
> I seem to be having a problem with a list being share across multiple
> instantiations of it and dont quite understand why this is happening.
>
> My class looks like this,
>
> class Widget(object):
> _parent = None
> _children = []
>
> def __init__(self, p
Ah thank you for clarifying, I did confuse instance and class
attributes from creating the list in the class def. I actually just
spiffed up that class to represent a portion of a much larger class
that needs getter and setter for children. Doing as you said fixed my
problem, heres the code as refe
1 - 100 of 186 matches
Mail list logo