On Friday 24 June 2005 02:53 pm, D H wrote:
> Again, you are splitting hairs. His point still stands that it is not
> possible to do method overloading in python (unless you use decorator
> hacks). It may be possible to add this feature when type declarations
> and type checking are added to a f
On Friday 24 June 2005 04:04 am, TPJ wrote:
> > If your target platform is Linux, indications are that python is as
> > portable as bash.
>
> I've thought about it for a few days and I disagree with you. Python
> isn't as portable as bash because of one reason. The problem is that
> development of
è¿æ¥æ¾ä¸ªä¸è¥¿ï¼æåå¨emule䏿¾å°äºï¼è¿åªæä¸ä¸ªæº
æéçäºå天乿²¡è½®å°.ï¼æåæ¾äºä¸ªåå廿±æ¡£äº
å¹³æ¥å¾å°ç¨emule æ³é®é®emuleæéå积åçå
³ç³»
æ¯ä¸æ¯ç§¯åæ¯ä¸å¯¹ä¸çï¼å¹¶ä¸æ¯æèªå·±æ»çä¸ä¼ ä¸è½½éæ¥è®¡ç®çï¼
妿å¯
On Friday 24 June 2005 05:26 pm, infidel wrote:
> dict((x, None) for x in alist)
or if you want it to run in 2.3 (before "generator
expressions"):
dict( [(x,None) for x in alist] )
Before the dict constructor, you needed to do this:
d={}
for key in alist:
d[key]=None
which is still only 3
This is a Englist maillist, you should better use English. And your
question is not about Python, you should ask it in emule maillist.
å¨ 05-6-25ï¼Denton<[EMAIL PROTECTED]> åéï¼
> è¿æ¥æ¾ä¸ªä¸è¥¿ï¼æåå¨emule䏿¾å°äºï¼è¿åªæä¸ä¸ªæº
>
> æéçäºå天乿²¡è½®å°.ï¼æ
On 6/24/05, Austin <[EMAIL PROTECTED]> wrote:
> def __init__(self,args):
> win32serviceutil.ServiceFramework.__init__(self,args)
> self.hWaitStop = win32event.CreateEvent(None, 0, 0, None)
> self.check = 1
Change last two lines to
self.check = 1
self.hWaitStop
Excellent Site for Developers
- you can ask any Question in VB6 or VB.NET
- you can download the best VB Books
- you can download ActiveX
- you can visit the most powerfull VB sites
http://www.mox-hosting.com/vbdevs/
--
http://mail.python.org/mailman/listinfo/python-list
In message <[EMAIL PROTECTED]>, Tony
Meyer <[EMAIL PROTECTED]> writes
>I have (unfortunately) a Python program that I can consistently (in a
>reproducible way) segfault. However, I've got somewhat used to Python's
>very nice habit of protecting me from segfaults and raising exceptions
>instead, an
<[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
|I apologise if this is a well known problem. I've searched and can't
| find a clear description or fix. Hope someone can help.
|
| I am running my Python scripts under Windows 2000 using Python 2.4
| Build 243 from Activestate.
|
Hi,
I'm new to python and I'm having trouble figuring
out a way to have a thread running on the background that over
rules the raw_input function. The example I'm working on is something like
having a thread that prints "You're taking too long" every 10 seconds, while
waiting for input fro
On 6/25/05, Stephen Prinster <[EMAIL PROTECTED]> wrote:
> guy lateur wrote:
>
> If you are new to Python and want to use it with COM, definitely get
> yourself a copy of _Python Programming on Win32_ by Mark Hammond and
> Andy Robinson.
...or at least read the chapter available online:
http://www
Fri, 24 Jun 2005 16:31:08 +0100 skrev Tom Anderson:
> On Fri, 24 Jun 2005, Joseph Garvin wrote:
>
>> Claudio Grondi wrote:
>>
>> So far we've got lisp macros and a thousand response's to the lua trick.
>> Anyone else have any actual non-python language tricks they like?
>
> Higher-order functions
Hi guy,
> I'll be using COM, and I could probably make an application that
> controls Outlook (externally). But I'd also like to have this
> functionality exposed in OL itself. So I guess I'll need to use VBA,
> but I don't really like VBA - relax, please, it's just an opinion.. ;)
>
> So, ideall
Mandus wrote:
> Fri, 24 Jun 2005 16:31:08 +0100 skrev Tom Anderson:
>>Higher-order functions like map, filter and reduce. As of Python 3000,
>>they're non-python tricks. Sigh - i guess it's time for me to get to know
>>list comprehensions a bit better.
>
> u-huu... I wasn't aware of that. It is
Hi,
I have come across the following statement a number of times:
http://mail.python.org/pipermail/python-list/2003-July/171805.html
[... how to enforce pure abstract class ...]
> Python, in general, doesn't try to stop the programmer doing things, the
> way many other languages do. This is know
On Sat, 25 Jun 2005 11:36:57 +0100, Jorge Louis De Castro <[EMAIL PROTECTED]>
wrote:
>Hi,
>
>I'm new to python and I'm having trouble figuring out a way to have a thread
>running on the background that over rules the raw_input function. The example
>I'm working on is something like having a thre
Hi,
I have a diamond-shaped multiple inheritanc chain with new style classes,
but super() does not call the parent class correctly:
-- snip --
from qtcanvas import *
class B2(QCanvasItem):
def move(self, x,y):
super(B2, self).move(0,0)
print "B2"
class C2(QCanvasItem):
d
Hello,
I've a question. Can I execute a part of a python code and put it's
output in a string? Something like this:
s = ""
s = exec """print "Hello World" """
print s
Greetz,
Noud
--
http://mail.python.org/mailman/listinfo/python-list
> The article implied that the automated system would allow for
> /shorter paths/ (the shortest path is the great circle, so this
> statement indicates that trans-oceanic flights are not using great
> circle/GPS routing). Most likely, the flights are using 50 minute "plumb
> lines", with a he
Uwe Mayer wrote:
> con: If you are planning larger applications (for a reasonable value of
> "large") you have to discipline yourself to write well structured code.
This is definitely true, no matter the language you use.
> Then you will want to specify interfaces,
If you're really interested i
Terry Hancock <[EMAIL PROTECTED]> wrote:
> Before the dict constructor, you needed to do this:
>
> d={}
> for key in alist:
> d[key]=None
I just re-read the documentation on the dict() constructor. Why does it
support keyword arguments?
dict(foo="bar", baz="blah") ==> {"foo":"bar", "baz
jwaixs wrote:
> I've a question. Can I execute a part of a python code and put it's
> output in a string?
>>> import sys
>>> from cStringIO import StringIO
>>>
>>> def exec_and_get_output(code):
... old_stdout = sys.stdout
... sys.stdout = StringIO()
... try:
... exec c
"Roy Smith" <[EMAIL PROTECTED]> wrote:
> I just re-read the documentation on the dict() constructor. Why does it
> support keyword arguments?
>
>dict(foo="bar", baz="blah") ==> {"foo":"bar", "baz"="blah"}
>
> This smacks of creeping featurism. Is this actually useful in real code?
> It took
Steve <[EMAIL PROTECTED]> wrote:
> One thing that I miss every once in a while is "pre-processing".
There are so many things wrong with preprocessing, at least if you're
thinking of the way C/C++ implements it (cpp). Cpp a number of things.
1) It does file inclusion. Pythons "import" serves th
On 6/25/05, Josef Meile <[EMAIL PROTECTED]> wrote:
> You could try to do an addin/addon for Word, Excel, and Outlook. You
> don't need to code with VBA. Here you just need a language from where
> you can access the microsoft interop assemblies (ie: C++ or C#;
> IronPython maybe?)
Hmm... Why jump t
On Sat, 25 Jun 2005 09:10:33 -0400, Roy Smith <[EMAIL PROTECTED]> wrote:
>Terry Hancock <[EMAIL PROTECTED]> wrote:
>> Before the dict constructor, you needed to do this:
>>
>> d={}
>> for key in alist:
>> d[key]=None
>
>I just re-read the documentation on the dict() constructor. Why does it
>s
Uwe Mayer wrote:
> I have a diamond-shaped multiple inheritanc chain with new style classes,
> but super() does not call the parent class correctly:
>
> -- snip --
> from qtcanvas import *
I don't have qtcanvas installed, and I couldn't reproduce the
undesirable behavior using a dummy class. If
Roy Smith wrote:
> I just re-read the documentation on the dict() constructor. Why does it
> support keyword arguments?
>
>dict(foo="bar", baz="blah") ==> {"foo":"bar", "baz"="blah"}
>
> This smacks of creeping featurism. Is this actually useful in real code?
Personally, I use it all t
rather... super troll
--
http://mail.python.org/mailman/listinfo/python-list
Do Re Mi chel La Si Do wrote:
> rather... super troll
100% Agreed.
Can anyone say, "This looks like spam... Feels like spam... and is about
as useful here in the Python forums as spam -- therfore my conclusion is
that his VB message probably IS SPAM." :-D
Brian
---
--
http://mail.python.
Hi all,
I'm experiencing problems with a regular expression and I can't figure
out which words I use when googling. I read the python documentation for
the re module multiple times now but still no idea what I'm doing wrong.
What I want to do:
- Extract all digits (\d) in a string.
- Digits are
On 6/25/05, Uwe Mayer <[EMAIL PROTECTED]> wrote:
> AFAIK super only works with new-style classes, so I checked:
>
> >>> from qtcanvas import *
> >>> isinstance(QCanvasItem, object)
> True
AFAIK, this is not the right way to check for new-styledness:
>>> class X: "i'm an old-styler"
>>> isinstanc
Felix Schwarz wrote:
> Hi all,
>
> I'm experiencing problems with a regular expression and I can't figure
> out which words I use when googling. I read the python documentation for
> the re module multiple times now but still no idea what I'm doing wrong.
>
> What I want to do:
> - Extract all
Hi,
to use a port below 1000 on a Unix system one needs root priviledges.
But it's dangerous to execute all of a script under those priviledges.
Therefore I'd like to drop the root priviledges as soon as possible.
(How) is this possible?
Many thanks for a hint,
Helmut Jarausch
Lehrstuhl fuer Nu
On 6/25/05, Mandus <[EMAIL PROTECTED]> wrote:
> It is really a consensus on this; that
> removing map, filter, reduce is a good thing? It will render a whole lot
> of my software unusable :(
I think you'll be able to use "from __past__ import map, filter,
reduce" or something like that :) They don
> to use a port below 1000 on a Unix system one needs root priviledges.
> But it's dangerous to execute all of a script under those priviledges.
> Therefore I'd like to drop the root priviledges as soon as possible.
> (How) is this possible?
>
Are you sure you don't just want to use twisted?
http
>> Higher-order functions like map, filter and reduce. As of Python 3000,
>> they're non-python tricks. Sigh - i guess it's time for me to get to know
>> list comprehensions a bit better.
>>
Couldnt there just be a "functional" module ?...
from functional import map, filter, reduce
--
http://
Roy Smith wrote:
> Terry Hancock <[EMAIL PROTECTED]> wrote:
> ...
> I just re-read the documentation on the dict() constructor. Why does it
> support keyword arguments?
>
>dict(foo="bar", baz="blah") ==> {"foo":"bar", "baz"="blah"}
>
> This smacks of creeping featurism. Is this actually us
Hallöchen!
I have a very simple package structure with one directory denoting a
package (with __init__.py file of course). In my setup.py I write
...
packages=['my_package']
...
Then I call "python setup.py bdist_dumb" on ym Linux box. The
resulting tar ball contains every file twi
On Fri, 24 Jun 2005 21:04:15 +0200, Christophe Delord wrote:
> Hello,
>
> On 24 Jun 2005 11:45:14 -0700, [EMAIL PROTECTED] wrote:
>
>> Hello,
>>
>> Can we impose if then else into list comprehension ?
>> Like we do in lambda-map form:
>>
>> This code change None into 0
>> L = [None, 12]
>> R =
On Sat, 25 Jun 2005 14:50:48 GMT, Brian <[EMAIL PROTECTED]> wrote:
> Do Re Mi chel La Si Do wrote:
>> rather... super troll
>
> 100% Agreed.
>
> Can anyone say, "This looks like spam... Feels like spam... and is about
> as useful here in the Python forums as spam -- therfore my conclusion is
On Fri, 24 Jun 2005 14:29:37 -0700, James wrote:
> Interesting thread ...
>
> 1.) Language support for ranges as in Ada/Pascal/Ruby
> 1..10 rather than range(1, 10)
What advantages do Pascal-like for loops give over Python for loops?
The only two I can think of are trivial:
(1) the Pascal-like
On Fri, 24 Jun 2005 15:47:45 -0700, James Stroud wrote:
> On Friday 24 June 2005 05:58 am, Steven D'Aprano wrote:
>> with colour do begin
>> red := 0; blue := 255; green := 0;
>> end;
>>
>> instead of:
>>
>> colour.red := 0; colour.blue := 255; colour.green := 0;
>>
>> Okay, so maybe it is more of
Hi,
I'm getting pretty desperate here:
The code below crashes on the last line (but works from a shell).
The class 'BC' exists and the loop on self.__BC_EXEC_LIST passes fine.
It's got to be something really stupid but I've been looking at it too long
I guess.
Any clue would be quite welcome.
On Fri, 24 Jun 2005 21:53:03 -0700, [EMAIL PROTECTED] wrote:
> Apologies if this question seems stupid: How does one write a
> function that increments a value in Python? When I tried, the variable
> never changed.
> The session went like this:
def incr(counter):
> counter = int(count
Hallöchen!
Ingrid Bronger <[EMAIL PROTECTED]> writes:
> [...]
>
> Then I call "python setup.py bdist_dumb" on ym Linux box. The
> resulting tar ball contains every file twice, e.g.
>
> ./usr/lib/python2.3/site-packages/my_package/my_module.py
> ./usr/lib/python2.3/site-packages/my_module.py
>
>
Hi,
Hopefully to make things clearer: this works from a shell:
In [23]:from SC.CARDS.BC import *
In [24]:l = inspect.getmembers(eval('BC'))
#l will get all members from class 'BC' whereas the code referenced below
gets an exception saying 'BC' is not defined.
Thanks,
Philippe
Philippe C.
On 6/25/05, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Fri, 24 Jun 2005 14:29:37 -0700, James wrote:
> > 2.) Contracts
>
> Explain please.
James probably meant Eiffel's Design by Contract. My favourite Python
implementation is Terence Way's http://www.wayforward.net/pycontract/
;-)
- kv
--
On Sat, 25 Jun 2005 06:44:22 -0700, George Sakkis wrote:
> "Roy Smith" <[EMAIL PROTECTED]> wrote:
>
>> I just re-read the documentation on the dict() constructor. Why does it
>> support keyword arguments?
>>
>>dict(foo="bar", baz="blah") ==> {"foo":"bar", "baz"="blah"}
>>
>> This smacks of c
"Felix Schwarz" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm experiencing problems with a regular expression and I can't figure
> out which words I use when googling. I read the python documentation for
> the re module multiple times now but still no idea what I'm doing wrong.
>
> What I want to d
Here's a pyparsing version of this, that may be easier to maintain long
term (although if you have your heart set on learning regexp's, they
will certainly do the job). Note that in pyparsing, you don't have to
spell out where the whitespace goes - pyparsing's default logic assumes
that whitespace
On Sat, 25 Jun 2005 17:41:58 +0200, Konstantin Veretennicov wrote:
> On 6/25/05, Mandus <[EMAIL PROTECTED]> wrote:
>> It is really a consensus on this; that
>> removing map, filter, reduce is a good thing? It will render a whole lot
>> of my software unusable :(
>
> I think you'll be able to use
"Steven D'Aprano" wrote:
> On Sat, 25 Jun 2005 06:44:22 -0700, George Sakkis wrote:
>
> > "Roy Smith" <[EMAIL PROTECTED]> wrote:
> >
> >> I just re-read the documentation on the dict() constructor. Why does it
> >> support keyword arguments?
> >>
> >>dict(foo="bar", baz="blah") ==> {"foo":"ba
On 6/25/05, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Sat, 25 Jun 2005 17:41:58 +0200, Konstantin Veretennicov wrote:
>
> > On 6/25/05, Mandus <[EMAIL PROTECTED]> wrote:
> >> It is really a consensus on this; that
> >> removing map, filter, reduce is a good thing? It will render a whole lot
On Fri, 24 Jun 2005, Roy Smith wrote:
> Tom Anderson <[EMAIL PROTECTED]> wrote:
>
>> The one thing i really do miss is method overloading by parameter type.
>> I used this all the time in java
>
> You do things like that in type-bondage languages
I love that expression. I think it started out a
On Sat, 25 Jun 2005, Konstantin Veretennicov wrote:
> On 6/25/05, Mandus <[EMAIL PROTECTED]> wrote:
>
>> It is really a consensus on this; that removing map, filter, reduce is
>> a good thing? It will render a whole lot of my software unusable :(
>
> I think you'll be able to use "from __past__ i
"Konstantin Veretennicov" <[EMAIL PROTECTED]> wrote:
> On 6/25/05, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> > On Sat, 25 Jun 2005 17:41:58 +0200, Konstantin Veretennicov wrote:
> >
> > > On 6/25/05, Mandus <[EMAIL PROTECTED]> wrote:
> > >> It is really a consensus on this; that
> > >> removing
Hi,
I found the solution to my problem:
Besides the fact I still have no clue as to how the Python name spacing
works, the code I though did stuff (the __EXEC_LIST loop) did not do as I
expected as I had already imported all of the modules in an explicit
manner.
So now I can rephrase my problem:
Sun, 26 Jun 2005 04:36:51 +1000 skrev Steven D'Aprano:
> On Sat, 25 Jun 2005 17:41:58 +0200, Konstantin Veretennicov wrote:
>
>> On 6/25/05, Mandus <[EMAIL PROTECTED]> wrote:
>>> It is really a consensus on this; that
>>> removing map, filter, reduce is a good thing? It will render a whole lot
>>>
Brian said unto the world upon 25/06/2005 10:50:
> Do Re Mi chel La Si Do wrote:
>
>>rather... super troll
>
>
> 100% Agreed.
>
> Can anyone say, "This looks like spam... Feels like spam... and is about
> as useful here in the Python forums as spam -- therfore my conclusion is
> that his
Sat, 25 Jun 2005 16:06:57 GMT skrev Lee Harr:
>>> Higher-order functions like map, filter and reduce. As of Python 3000,
>>> they're non-python tricks. Sigh - i guess it's time for me to get to know
>>> list comprehensions a bit better.
>>>
>
>
> Couldnt there just be a "functional" module ?...
>
Why overload when you can use class methods?
--
http://mail.python.org/mailman/listinfo/python-list
Sun, 26 Jun 2005 04:14:19 +1000 skrev Steven D'Aprano:
> On Fri, 24 Jun 2005 21:53:03 -0700, [EMAIL PROTECTED] wrote:
>
>> Apologies if this question seems stupid: How does one write a
>> function that increments a value in Python? When I tried, the variable
>> never changed.
>> The session went
Mandus wrote:
> By using the builtin reduce, I
> move the for-loop into the c-code which performs better.
No. There is no hope of ever writing fast code when you do not actually
measure its performance.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep
references to them in a 2 dimensional list ( rBtns[r][c] ). It works
fine, and I can even make it so only one button per column can be
selected, by assigning each column to an intVar. In many languages a
radiobutton has a prop
Hi,
Not being from anglo-saxon heritage, I keep wondering why spammers always
(or very often) get called 'trolls' ?
I mean fantasy fiction has brought us many hugly beasts (goblin, warlock,
orc, dark elf )
The trolls, as I recall, grow back their limns once those have been cut by
the nice fo
Philippe C. Martin wrote:
> l = inspect.getmembers(eval('BC')) #THIS CRASHES - the class exists
Care to provide the traceback?
> In [23]:from SC.CARDS.BC import *
>
> In [24]:l = inspect.getmembers(eval('BC'))
What happened in lines 1 through 22? My guess would be
In [13]:from SC.CARDS import
Sorry, limbs (plus I check in a dictionnary first!)
Philippe C. Martin wrote:
> limns
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> One of the things I liked in Pascal was the "with" keyword. You could
> write something like this:
>
> with colour do begin
> red := 0; blue := 255; green := 0;
> end;
>
> instead of:
>
> colour.red := 0; colour.blue := 255; colour.green := 0;
>
> Okay, so maybe it is m
Philippe> Not being from anglo-saxon heritage, I keep wondering why
Philippe> spammers always (or very often) get called 'trolls' ?
Fishing from a boat that is moving slowly is called "trolling". You're
slowly dragging bait or a lure through the water to entice a fish to bite
your hook.
OK Peter, first of all thanks.
You seem to be German and although I leave in the states, I'm French and
your english is clearly far more advanced than mine: I have yet to
understand a few of your comments ;-)
> Care to provide the traceback?
Traceback (most recent call last):
File "SC_Shell.py
Sat, 25 Jun 2005 21:30:26 +0200 skrev Peter Otten:
> Mandus wrote:
>
>> By using the builtin reduce, I
>> move the for-loop into the c-code which performs better.
>
> No. There is no hope of ever writing fast code when you do not actually
> measure its performance.
I do.
--
Mandus - the only man
Woof!
And I thought my english was improving !
I'm laughing very hard right now, thanks !
Philippe
Skip Montanaro wrote:
>
> Philippe> Not being from anglo-saxon heritage, I keep wondering why
> Philippe> spammers always (or very often) get called 'trolls' ?
>
> Fishing from a boa
But by using the builtin reduce, you need to specify a function, which
probably slows it down more than any speed-up from the loop in C.
--
http://mail.python.org/mailman/listinfo/python-list
25 Jun 2005 13:15:16 -0700 skrev Devan L:
> But by using the builtin reduce, you need to specify a function, which
> probably slows it down more than any speed-up from the loop in C.
Sounds reasonable, but not always the case, especially when dealing with
numpy arrays. At least that what some of m
I meant live, not leave ! (this is getting pretty bad)
Philippe C. Martin wrote:
> OK Peter, first of all thanks.
>
> You seem to be German and although I leave in the states, I'm French and
> your english is clearly far more advanced than mine: I have yet to
> understand a few of your comments
Devan L wrote:
> But by using the builtin reduce, you need to specify a function, which
> probably slows it down more than any speed-up from the loop in C.
Not if the function is from an extension module. For some applications,
this can be quite common.
Of course, in a Python 3000 world, nothing
On Sat, 25 Jun 2005 15:36:06 -0400, Philippe C. Martin wrote
(in article <[EMAIL PROTECTED]>):
> Hi,
>
> Not being from anglo-saxon heritage, I keep wondering why spammers always
> (or very often) get called 'trolls' ?
>
> I mean fantasy fiction has brought us many hugly beasts (goblin, warlock,
Philippe C. Martin wrote:
> OK Peter, first of all thanks.
>
> You seem to be German and although I leave in the states, I'm French and
> your english is clearly far more advanced than mine: I have yet to
> understand a few of your comments ;-)
My French is mostly read-only, so let me rephrase:
Mandus wrote:
> 25 Jun 2005 13:15:16 -0700 skrev Devan L:
>> But by using the builtin reduce, you need to specify a function, which
>> probably slows it down more than any speed-up from the loop in C.
>
> Sounds reasonable, but not always the case, especially when dealing with
> numpy arrays. At
Hi.
> > If you are new to Python and want to use it with COM, definitely get
> > yourself a copy of _Python Programming on Win32_ by Mark Hammond and
> > Andy Robinson.
>
> ...or at least read the chapter available online:
> http://www.oreilly.com/catalog/pythonwin32/chapter/ch12.html
Also, check
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
This is the case:
>>> n=(100,) tuple(*n)
Traceback (most recent call last):
File "", line 1, in -toplevel-
tuple(*n)
TypeError: iteration over non-sequence
To be sure I searched for ways to check if something is a sequence:
>>> n.__iter__().n
Elmo Mäntynen wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> This is the case:
>
>
n=(100,) tuple(*n)
>
>
> Traceback (most recent call last):
> File "", line 1, in -toplevel-
> tuple(*n)
> TypeError: iteration over non-sequence
n is a sequence. *n correctly expands. T
Elmo Mäntynen wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> This is the case:
>
>
n=(100,) tuple(*n)
>
>
> Traceback (most recent call last):
> File "", line 1, in -toplevel-
> tuple(*n)
> TypeError: iteration over non-sequence
The star (*n) means you are essentially
[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2005-05-01_2005-05-15.html]
=
Summary Announcements
=
--
PEP 340 Episode 2: Revenge of the With (Block)
-
[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2005-05-16_2005-05-31.html]
=
Summary Announcements
=
QOTF
We have our first ever Quote of the Fortnight (QOTF), thanks to
the wave of discussion over `PEP 343`_
[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2005-06-01_2005-06-15.html]
=
Summary Announcements
=
-
Bug Day: Saturday, June 25th 2005
-
AMK organized an
On Sun, 26 Jun 2005 04:08:31 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>On Fri, 24 Jun 2005 15:47:45 -0700, James Stroud wrote:
>
>> On Friday 24 June 2005 05:58 am, Steven D'Aprano wrote:
>>> with colour do begin
>>> red := 0; blue := 255; green := 0;
>>> end;
>>>
>>> instead of:
>>>
>>>
Guido gave a good, long interview, available at IT Conversations, as was
recently announced by Dr. Dobb's Python-URL! The audio clips are available
here:
http://www.itconversations.com/shows/detail545.html
http://www.itconversations.com/shows/detail559.html
I'd like to comment on a few parts of
On 23 Jun 2005 21:27:20 -0700, "Paul McGuire" <[EMAIL PROTECTED]> wrote:
>Dang, that class should be:
>
>class PaddedStr(str):
>def __new__(cls,s,l,padc=' '):
>if l > len(s):
>s2 = "%s%s" % (s,padc*(l-len(s)))
>return str.__new__(cls,s2)
>else:
>
"Elmo Mäntynen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
n=(100,) tuple(*n)
As posted, this gives a syntax error. What is missing?
tjr
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 25 Jun 2005 19:23:18 +, Mandus wrote:
> Sat, 25 Jun 2005 16:06:57 GMT skrev Lee Harr:
Higher-order functions like map, filter and reduce. As of Python 3000,
they're non-python tricks. Sigh - i guess it's time for me to get to know
list comprehensions a bit better.
"Mandus" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Fri, 24 Jun 2005 16:31:08 +0100 skrev Tom Anderson:
>> On Fri, 24 Jun 2005, Joseph Garvin wrote:
>> Higher-order functions like map, filter and reduce. As of Python 3000,
>> they're non-python tricks. Sigh - i guess it's time
"Dave Benjamin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Guido gave a good, long interview, available at IT Conversations, as was
> recently announced by Dr. Dobb's Python-URL! The audio clips are available
[snip]
> - Java: the usual static vs. dynamic, static analysis vs.
On Sat, 25 Jun 2005 15:44:14 -0400, Nicolas Fleury wrote:
> Steven D'Aprano wrote:
>> One of the things I liked in Pascal was the "with" keyword. You could
>> write something like this:
>>
>> with colour do begin
>> red := 0; blue := 255; green := 0;
>> end;
>>
>> instead of:
>>
>> colour.red :
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Elmo Mäntynen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> n=(100,) tuple(*n)
>
> As posted, this gives a syntax error. What is missing?
Actually, I should have said 'as received'.
--
htt
On Saturday 25 June 2005 11:08 am, Steven D'Aprano wrote:
> The problem is, you have made colour (returning to English spelling
> instead of foreign) into a class. If you need two colour variables, you
> have to duplicate the code for the class (perhaps only changing the
> numeric constants. You
On Sat, 25 Jun 2005 21:30:26 +0200, Peter Otten wrote:
> Mandus wrote:
>
>> By using the builtin reduce, I
>> move the for-loop into the c-code which performs better.
>
> No. There is no hope of ever writing fast code when you do not actually
> measure its performance.
Good grief! You've been
On Sat, 25 Jun 2005 13:31:19 -0700, Robert Kern wrote:
> Of course, in a Python 3000 world, nothing stops anyone from using their
> own extension module implementing map, filter, and reduce if they really
> want to. TSBOOOWTDI in the language/stdlib, but it shouldn't stop anyone
> from using ot
On Sat, 25 Jun 2005 23:19:48 +0200, Peter Otten wrote:
> Python is more about readability than raw speed, and I prefer a for-loop
> over reduce() in that respect, too.
Fascinating. I prefer reduce for readability. "Reduce this list to one
value, using this known behaviour" seems to work for me b
1 - 100 of 114 matches
Mail list logo