quasi wrote:
> Gib Bogle wrote:
>
> >Ah, so the firefighters were in on the conspiracy!
>
> No, but the firefighters are very much aware that there is more to
> 9/11 than has been officially revealed.
>
> This is even more true at Pentagon. The firefighters there brought
> dogs trained to search
MooseFET wrote:
> On May 4, 8:19 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>> MooseFET wrote:
>>> On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>>> []
The Marxist contribution to western thought is that it put everything in
terms of labor and thus allowed us to quantif
On May 5, 12:19 pm, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Larry Bates <[EMAIL PROTECTED]> wrote:
>
>...
>
> > Isn't deprecated like depreciated but not quite to zero yet?
>
> No. "To deprecate" comes from a Latin verb meaning "to ward off a
> disaster by prayer"; when you're saying you de
On May 4, 8:19 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> MooseFET wrote:
> > On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> > []
>
> >>The Marxist contribution to western thought is that it put everything in
> >>terms of labor and thus allowed us to quantify the human compone
In <[EMAIL PROTECTED]>, Wiseman wrote:
> Note: I know there are LALR parser generators/parsers for Python, but
> the very reason why re exists is to provide a much simpler, more
> productive way to parse or validate simple languages and process text.
> (The pyparse/yappy/yapps/ generator here> arg
wang frank wrote:
> When I edit a module, I have to quit python and then restart python and
> then import the module. Are there any way to avoid quit python to load an
> updated module? When I am debugging a module code, I need to constantly
> make changes. It is not convenient to quit and reload.
In <[EMAIL PROTECTED]>, prad wrote:
> On Friday 04 May 2007 18:40:53 Tommy Grav wrote:
>> Can anyone help me with the right approach for this
>> in python?
>
> for each in a:
> for item in a[a.index(each)+1:]:
> print each,item
>
> will produce
>
> 1 2
> 1 3
> 1 4
> 1 5
> 2 3
> 2 4
prad wrote:
> On Friday 04 May 2007 18:40:53 Tommy Grav wrote:
>> Can anyone help me with the right approach for this
>> in python?
>
> for each in a:
> for item in a[a.index(each)+1:]:
> print each,item
>
> will produce
>
> 1 2
> 1 3
> 1 4
> 1 5
> 2 3
> 2 4
> 2 5
> 3 4
> 3 5
> 4 5
Tommy Grav <[EMAIL PROTECTED]> writes:
> In C this would be equivalent to:
> for(i = 0; i < n; i++) {
> for(j=i+1; j < n; j++) {
> print a[i], a[j]
for i in xrange(n):
for j in xrange(i+1, n):
print a[i], a[j]
--
http://mail.python.org/mailman/listinfo/python-list
Tommy Grav wrote:
> I have a list:
>
>a = [1., 2., 3., 4., 5.]
>
> I want to loop over a and then
> loop over the elements in a
> that is to the right of the current
> element of the first loop
>
> In C this would be equivalent to:
>
> for(i = 0; i < n; i++) {
> for(j=i+1; j < n; j++)
Hi,
When I edit a module, I have to quit python and then restart python and
then import the module. Are there any way to avoid quit python to load an
updated module? When I am debugging a module code, I need to constantly
make changes. It is not convenient to quit and reload.
Thanks
Frank
__
Charles wrote:
> On Fri, 04 May 2007 20:19:33 -0700, James Stroud
> <[EMAIL PROTECTED]> wrote:
>
>
>>MooseFET wrote:
>>
>>>On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>>>[]
>>>
>>>
The Marxist contribution to western thought is that it put everything in
terms of labor
I'm unable to get mod_python to work properly on my Windows XP box.
Any help would be appreciated.
Here is what is installed:
Apache 2.2.4
Python 2.5.1
mod_python 3.3.1 for python 2.5 and apache 2.2
Here is the error I get when trying to start apache:
Event Type: Error
Event Source: Apache
On May 4, 9:19�pm, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Larry Bates <[EMAIL PROTECTED]> wrote:
>
> � �...
>
> > Isn't deprecated like depreciated but not quite to zero yet?
>
> No. �"To deprecate" comes from a Latin verb meaning "to ward off a
> disaster by prayer"; when you're saying you dep
"Wiseman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| I'm kind of disappointed with the re regular expressions module.
I believe the current Python re module was written to replace the Python
wrapping of pcre in order to support unicode.
| In particular, the lack of support f
"Ben Collver" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| In the bug report itself,
See my other response to you.
| Feedback in this newsgroup names my bug report as a "hobby horse",
That was not directed as you but the claim by someone else that I and other
reviewers are i
"Ben Collver" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi Terry,
|
| I understand and agree that the number was the same bit pattern.
OK
| I don't remember being asked to challenge this.
You don't need an invitation to disagree with another person's tracker
comment. I a
This may seem very strange, but it is true.
If I delete a .pyc file, my program executes with a different state!
In a single directory I have
module1 and module2.
module1 imports random and MyClass from module2.
module2 does not import random.
module1 sets a seed like this::
if __name__ == "__m
On Fri, 04 May 2007 20:19:33 -0700, James Stroud
<[EMAIL PROTECTED]> wrote:
>MooseFET wrote:
>> On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>> []
>>
>>>The Marxist contribution to western thought is that it put everything in
>>>terms of labor and thus allowed us to quantify th
MooseFET wrote:
> On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> []
>
>>The Marxist contribution to western thought is that it put everything in
>>terms of labor and thus allowed us to quantify the human component of
>>economies.
>
>
> No the great insight by Marx was in the s
Michael <[EMAIL PROTECTED]> wrote:
> Thus, whenever I need to pass information to a function, I use default
> arguments now. Is there any reason not to do this other than the fact
> that it is a bit more typing?
You're giving your functions a signature that's different from the one
you expect it
On Friday 04 May 2007 18:40:53 Tommy Grav wrote:
> Can anyone help me with the right approach for this
> in python?
for each in a:
for item in a[a.index(each)+1:]:
print each,item
will produce
1 2
1 3
1 4
1 5
2 3
2 4
2 5
3 4
3 5
4 5
a.index(each) gives the index of the each value i
Miki <[EMAIL PROTECTED]> wrote:
...
> > Is there a lightweight Https Server I could run locally (WINXP), which
> > would run .py scripts, without lots of installation modifications ?
> http://lighttpd.net.
> Make sure "mod_cgi" is uncommented, set your document root and set
> right python interp
On May 5, 1:24 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On 4 May 2007 08:02:13 -0700, Chris <[EMAIL PROTECTED]> declaimed the
> following in comp.lang.python:
>
> > Ah, sorry, I wasn't being precise. I meant the python commandline
> > python interpreter.
>
> > So from aterminalI type (for
Steven W. Orr <[EMAIL PROTECTED]> wrote:
...
> I need to unpack this into three seperate arrays called name, fields,
> valid. The old code looked like this:
You're using lists, not arrays. If you DID want arrays, you'd have to
import standard library module array, and you'd be limited to a few
James Stroud wrote:
> James Stroud wrote:
>> James Stroud wrote:
[finally ...]
>
> I should really wait until I've had some coffee. Not continue, but break!
>
>
> for i,line in enumerate(linelist):
>line = line.split()
>for k in line:
> if keyword.iskeyword(k):
>total += lin
Tommy Grav <[EMAIL PROTECTED]> wrote:
> I have a list:
>
>a = [1., 2., 3., 4., 5.]
>
> I want to loop over a and then
> loop over the elements in a
> that is to the right of the current
> element of the first loop
>
> In C this would be equivalent to:
>
> for(i = 0; i < n; i++) {
> for
Larry Bates <[EMAIL PROTECTED]> wrote:
...
> Isn't deprecated like depreciated but not quite to zero yet?
No. "To deprecate" comes from a Latin verb meaning "to ward off a
disaster by prayer"; when you're saying you deprecate something, you're
saying you're praying for that something to disapp
Hiya,
I just tried sending an email to [EMAIL PROTECTED] to request a
website change, and the email bounced back with this excerpt from the
delivery failure report:
"""
Reporting-MTA: dns; bag.python.org
[...]
Final-Recipient: rfc822; [EMAIL PROTECTED]
Original-Recipient: rfc822; [EMAIL PROTECTED
On May 4, 12:32 pm, James Stroud <[EMAIL PROTECTED]> wrote:
[]
> The Marxist contribution to western thought is that it put everything in
> terms of labor and thus allowed us to quantify the human component of
> economies.
No the great insight by Marx was in the selling of ducks. "Anybody
wan
I have a list:
a = [1., 2., 3., 4., 5.]
I want to loop over a and then
loop over the elements in a
that is to the right of the current
element of the first loop
In C this would be equivalent to:
for(i = 0; i < n; i++) {
for(j=i+1; j < n; j++) {
print a[i], a[j]
and should yield:
Fuzzyman wrote:
> On May 4, 11:28 pm, Paul Boddie <[EMAIL PROTECTED]> wrote:
> > Despite the permissive licences - it'd be hard to slap a
> > bad EULA on IronPython now - the whole thing demonstrates Microsoft's
> > disdain for open standards as usual,
>
> How do you work that out? It seems like a
On May 4, 12:39 pm, 7stud <[EMAIL PROTECTED]> wrote:
> On May 4, 3:30 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > Hi,
>
> > Can anyone explain the following:
>
> > Python 2.5 (r25:51908, Apr 9 2007, 11:27:23)
> > [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
> > Type "help", "copyright", "credits" o
I'm kind of disappointed with the re regular expressions module. In
particular, the lack of support for recursion ( (?R) or (?n) ) is a
major drawback to me. There are so many great things that can be
accomplished with regular expressions this way, such as validating a
mathematical expression or pa
On May 4, 1:31 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: [EMAIL PROTECTED]
>
> > On May 4, 5:02 am, Jaswant <[EMAIL PROTECTED]> wrote:
> > > This is a simple way to do it i think
>
> > > s=hello
>
> > > >>> if(len(s)==0):
>
> > > ... print "Em
> A second question is: When can you use += vs .append().
> Are the two always the same?
They are never the same unless you only add one item to the list.
append() will only increase the length of a list by 1.
la = [1,2]
lb = [3, 4, 5]
la += lb
print la
lc = [1,2]
lc.append(lb)
print lc
--outpu
On May 5, 7:03 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote:
> This is more for my education and not so much for practicality.
>
[snip]
>
> A second question is: When can you use += vs .append(). Are the two always
> the same?
>
Formally, they can never be the same. They can be used to produce th
On May 4, 3:30 pm, [EMAIL PROTECTED] wrote:
> Hi,
>
> Can anyone explain the following:
>
> Python 2.5 (r25:51908, Apr 9 2007, 11:27:23)
> [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> def
> foo():
>
> ... x = 2
>
On May 4, 11:28 pm, Paul Boddie <[EMAIL PROTECTED]> wrote:
> Luis M. González wrote:
>
> > Indeed, the subject is absolutely on-topic.
> > If can't talk about a so called "Dynamic Languages Runtime" in a
> > pyhton mailing list, I wonder what it takes to be considered on-topic.
> > Frankly, this on
Hello Everyone
I am receiving an error in an application I am working on. The
application when its done will be a Dungeons and Dragons Network game. I
am having problems with the Networked Canvas basically for drawing the
dungeon maps
If I initialize two of the Tkinter Canvas widgets with in t
Luis M. González wrote:
>
> Indeed, the subject is absolutely on-topic.
> If can't talk about a so called "Dynamic Languages Runtime" in a
> pyhton mailing list, I wonder what it takes to be considered on-topic.
> Frankly, this on-topic/off-topic fascism I see in this list is pissing
> me off a lit
On Fri, 2007-05-04 at 14:30 -0700, [EMAIL PROTECTED] wrote:
> Hi,
>
> Can anyone explain the following:
>
> Python 2.5 (r25:51908, Apr 9 2007, 11:27:23)
> [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> def foo():
>
[EMAIL PROTECTED] wrote:
> Hi,
>
> Can anyone explain the following:
>
> Python 2.5 (r25:51908, Apr 9 2007, 11:27:23)
> [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
def foo():
>
> ... x = 2
> ...
>
foo(
On May 4, 6:23 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On May 4, 11:34 am, Peter Otten <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > It is not possible to index set objects. That is OK.
> > > But, what if I want to find some element from the Set.
>
> > > from sets
On May 4, 6:12 pm, Fuzzyman <[EMAIL PROTECTED]> wrote:
> On May 4, 5:27 pm, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>
>
>
> > On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote:
>
> > > On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>
> > > > Kindly refrain from creating any more o
Mike wrote:
> I just realized in working with this more that the issues I was having
> with instancemethod and other things seems to be tied solely to
What you describe below is a function that happens to be an attribute of an
instance. There are also "real" instance methods that know about "thei
On May 4, 10:39 pm, Steven Howe <[EMAIL PROTECTED]> wrote:
> Fuzzyman wrote:
[snip ...]
>
> >> You are childishly beckoning Usenet etiquette to be gone so that you
> >> may do whatever you wish. But I trust that you will not, out of spite
> >> for being rebuked, turn a few small mistakes into a per
Fuzzyman wrote:
> On May 4, 5:27 pm, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>
>> On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote:
>>
>>
>>> On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>>>
Kindly refrain from creating any more off-topic, cross-posted threa
Hi,
Can anyone explain the following:
Python 2.5 (r25:51908, Apr 9 2007, 11:27:23)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo():
... x = 2
...
>>> foo()
>>> def bar():
... x[2] = 2
...
>>>
>>> bar()
On May 3, 8:33 pm, [EMAIL PROTECTED] wrote:
> Hello!
>
> If I do
>
> import uno
> localContext=uno.getComponentContext()
>
dir(type(localContext))
Perhaps ?
Fuzzyman
http://www.voidspace.org.uk/ironpython/index.shtml
> then localContext is of type
> I guess it's a new type provided by PyUNO e
On May 4, 5:27 pm, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
> On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote:
>
> > On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>
> > > Kindly refrain from creating any more off-topic, cross-posted threads.
> > > Thanks.
>
> > The only off-topi
Hello Richard,
> I do not want to run a framework yet. I would like to understand
> python at script level, before adding more aspects to learn, like
> frameworks.
The way CGI works is that your script is called every time the
corresponding HTML is loaded. You can access all the parameters sent
t
In article <[EMAIL PROTECTED]>,
Kaz Kylheku <[EMAIL PROTECTED]> wrote:
> On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote:
> > On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
> >
> > > Kindly refrain from creating any more off-topic, cross-posted threads.
> > > Thanks.
> >
> >
This is more for my education and not so much for practicality.
I have a structure that sort of looks like this:
mdict = {33:{'name': 'Hello0',
'fields':'fields0',
'valid': 'valid0'
55:{'name': 'Hello1',
'fields':'fields1',
'valid': 'v
mosscliffe a écrit :
> Bruno,
>
> Many thanks for your very helpful reply.
>
> I am trying WingIDE Personal as an editor, up to now it seems OK.
>
> My ISP is running Python 2.4.3 and does not know about mod_python.
>
Few ISPs want to deploy mod_python...
> I do not want to run a framework ye
"wang frank" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am a new user on Python and I really love it.
>
> I have a big text file with each line like:
>
> label 3
> teststart 5
> endtest 100
> newrun 2345
>
> I opened the file by uu=open('test.txt','r') and then read the
On May 4, 2:05 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> Mike wrote:
> > staticmethod makes the function available to the whole class according
> > to the docs. What if I only want it to be available on a particular
> > instance? Say I'm adding abilities to a character in a game and I want
> > t
Hello Frank,
> I am a new user on Python and I really love it.
The more you know, the deeper the love :)
> I have a big text file with each line like:
>
> label 3
> teststart 5
> endtest 100
> newrun 2345
>
> I opened the file by uu=open('test.txt','r') and then read th
On May 4, 4:13 am, Dustan <[EMAIL PROTECTED]> wrote:
> On May 4, 1:36 am, Michael <[EMAIL PROTECTED]> wrote:
> > ... def g(x=x):
> > ... x = x + 1
> > ... return x
> > ... return g
> > >>> g = f(3)
> > >>> g()>
> > 4
> >>> g()
> 4
> >>> g()
> 4
> >>> g() # what is going on h
On 4 May 2007 12:59:39 -0700, Michael <[EMAIL PROTECTED]> wrote:
> On May 4, 9:19 am, John Nagle <[EMAIL PROTECTED]> wrote:
> > > ... def g():
> > > ... x = x + 1
> >
> > Too cute. Don't nest functions in Python; the scoping model
> > isn't really designed for it.
>
> How can you
Alex Martelli wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>> On Wed, 02 May 2007 21:19:54 -0400, Roy Smith wrote:
>>
>>> for c in s:
>>>raise "it's not empty"
>> String exceptions are depreciated and shouldn't be used.
>>
>> http://docs.python.org/api/node16.html
>
> They're actuall
wang frank wrote:
> Hi,
>
> I am a new user on Python and I really love it.
> I have a big text file with each line like:
>
> label 3
> teststart 5
> endtest 100
> newrun 2345
>
> I opened the file by uu=open('test.txt','r') and then read the data as
> xx=uu.readlines(
On 4 May 2007 12:55:03 -0700, Michael <[EMAIL PROTECTED]> wrote:
> On May 4, 5:49 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> > You aren't getting "bit" by any problem with closures - this is a
> > syntax problem.
>
> I understand that it is not closures that are specifically biting me.
> Howev
On May 4, 9:19 am, John Nagle <[EMAIL PROTECTED]> wrote:
> > ... def g():
> > ... x = x + 1
>
> Too cute. Don't nest functions in Python; the scoping model
> isn't really designed for it.
How can you make generators then if you don't nest?
> Python probably isn't the right l
On May 4, 5:49 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
> You aren't getting "bit" by any problem with closures - this is a
> syntax problem.
I understand that it is not closures that are specifically biting me.
However, I got bit, it was unplesant and I don't want to be bit
again;-)
Thus, w
I haven't used it myself, but I'm pretty sure you're going to get a lot of
pointers to
http://pyparsing.wikispaces.com/
Also you may want to start naming your variables something more descriptive.
IE
testResultsFile = open('test.txt','r')
testLines=testResultsFile.readlines()
for line in testLin
default wrote:
> On Fri, 04 May 2007 03:26:17 -0700, James Stroud
> <[EMAIL PROTECTED]> wrote:
>
>> default wrote:
>>> On 2 May 2007 20:10:20 -0700, Midex <[EMAIL PROTECTED]> wrote:
>>>
LIES LIES LIES LIES LIES
>>> Trying to understand the World Trade Center events is like waking up
>>> to ac
The following script dumps all objects allocated since the last time it was
called. It suppresses the dump if more than 200 new objects were allocated.
g.app.idDict is a dict whose keys are id(obj) and whose values are obj.
(g.app.idDict will persist between invocations of the script). This all
Hi,
I am a new user on Python and I really love it.
I have a big text file with each line like:
label 3
teststart 5
endtest 100
newrun 2345
I opened the file by uu=open('test.txt','r') and then read the data as
xx=uu.readlines()
In xx, it contains the list of each
On May 2, 4:15 pm, minitotoro <[EMAIL PROTECTED]> wrote:
> On May 2, 3:46 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
>
>
>
> > minitotoro wrote:
> > > On May 2, 3:07 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> > >> [EMAIL PROTECTED] wrote:
> > >>> I have a script that runs fine in Windows 2003 (32
* Ben Collver (Fri, 04 May 2007 06:40:50 -0700)
> Thorsten Kampe wrote:
> > He was using /Windows/ Python in Cygwin *chuckle*... Windows Python
> > says Ctrl-Z because it doesn't know that it's been run from bash where
> > Ctrl-Z is for job control.
> >
> > And the lesson we learn from that: if
> -Original Message-
> From: [EMAIL PROTECTED]
>
> On May 4, 5:02 am, Jaswant <[EMAIL PROTECTED]> wrote:
> > This is a simple way to do it i think
> >
> > s=hello
> >
> > >>> if(len(s)==0):
> >
> > ... print "Empty"
> > ... else:
> > ... print s
> > ...
> > hello
>
> But you are
Paul McGuire wrote:
> Just to beat this into the ground, "test for equality" appears to be
> implemented as "test for equality of hashes". So if you want to
> implement a class for the purposes of set membership, you must
> implement a suitable __hash__ method. It is not sufficient to
> implemen
On May 4, 5:02 am, Jaswant <[EMAIL PROTECTED]> wrote:
> This is a simple way to do it i think
>
> s=hello
>
> >>> if(len(s)==0):
>
> ... print "Empty"
> ... else:
> ... print s
> ...
> hello
But you are still making the assumption that s is a string.
(BTW, you need quotes around your exam
Bruno,
Many thanks for your very helpful reply.
I am trying WingIDE Personal as an editor, up to now it seems OK.
My ISP is running Python 2.4.3 and does not know about mod_python.
I do not want to run a framework yet. I would like to understand
python at script level, before adding more aspe
Mike wrote:
> staticmethod makes the function available to the whole class according
> to the docs. What if I only want it to be available on a particular
> instance? Say I'm adding abilities to a character in a game and I want
> to give a particular character the ability to 'NukeEverybody'. I don
On May 3, 11:25 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Thu, 03 May 2007 16:52:55 -0300, Mike <[EMAIL PROTECTED]> escribió:
>
> > I was messing around with adding methods to a class instance at
> > runtime and saw the usual code one finds online for this. All the
> > examples I saw
On May 3, 10:34 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> The problem is not that you are decorating a method but that you are trying
> to use a callable class instance as a method. For that to work the class
> has to implement the descriptor protocol, see
>
> http://users.rcn.com/python/downloa
On May 4, 11:50 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> On May 4, 5:04 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
>
> > Does set membership test for equality ("==") or identity ("is")? I
> > just did some simple class tests, and it looks like sets test for
> > identity.
>
> Sets are lik
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>Hello,
>
>the simplest way to launch the user's standard mail client from a
>Python program is by creating a mailto: URL and launching the
>webbrowser:
>
>def mailto_url(to=None,subject=None,body=None,cc=None):
>"""
>
mosscliffe a écrit :
> I am very new to this python world, but I do like the look of the
> language / syntax, though I have had some problems with indenting
> using a text editor.
There's no shortage of smart code editor having a decent support for
Python.
>
> I have managed to get my ISP to ex
On May 4, 5:04 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> Does set membership test for equality ("==") or identity ("is")? I
> just did some simple class tests, and it looks like sets test for
> identity.
Sets are like dictionaries, they test for equality:
>>> a=1,2
>>> b=1,2
>>> a is b
False
Does that mean if I am not "in the NYC area", I am not welcomed? Not
even if I frequently visit NYC (Manhattan)? If I were born and raised
in NYC (not necessarily Manhattan), would I be granted the opportunity
to attend? Hmm...
DPD.
John Clark wrote:
Greetings!
The next Ne
krishnakant Mane a écrit :
> hello all,
> I am trying a very complex kind of a task in a project.
> I have a knowledge management system where I need to store a lot of
> objects (pickled). I have to store mostly lists and dictionaries into
> a rdbms.
Which totally defeats the purpose of a rdbms.
Paul McGuire wrote:
> Does set membership test for equality ("==") or identity ("is")?
As Alex said, equality:
>>> a = 0.0
>>> b = -0.0
>>> a is b
False
>>> a == b
True
>>> set([a, b])
set([0.0])
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote:
> On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote:
>
> > Kindly refrain from creating any more off-topic, cross-posted threads.
> > Thanks.
>
> The only off-topic posting in this thread is your own (and now this
> one).
You are ma
Michael wrote:
> On May 2, 6:08 am, Carsten Haese <[EMAIL PROTECTED]> wrote:
>
>>On Tue, 2007-05-01 at 22:21 -0700, Michael wrote:
> I agree the performance gains are minimal. Using function defaults
> rather than closures, however, seemed much cleaner an more explicit to
> me. For example, I h
I'm happy to announce that ActivePython 2.5.1.1 is now available for
download from:
http://www.activestate.com/products/activepython/
This is a patch release that updates ActivePython to core Python 2.5.1.
This release also fixes a couple problems with running pydoc from the
command line on W
On May 4, 3:21 pm, Thomas Nelson <[EMAIL PROTECTED]> wrote:
> I want to generate all the fractions between 1 and limit (with
> limit>1) in an orderly fashion, without duplicates.
>
> def all_ratios(limit):
> s = set()
> hi = 1.0
> lo = 1.0
> while True:
> if hi/lo not in s:
> You might be trying to write to a section that is currently off
> screen.
Bingo. I *thought* I was okay, but I wasn't refreshing until the
end of the display loop, so I never saw all the addstr() calls that
had succeeded but which had yet to be painted. Adding a refresh()
call in the loop expo
On May 4, 9:50 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> Thomas Nelson <[EMAIL PROTECTED]> wrote:
> > I want to generate all the fractions between 1 and limit (with
> > limit>1) in an orderly fashion, without duplicates.
>
> > def all_ratios(limit):
> > s = set()
> > hi = 1.0
> > l
Mark Tarver <[EMAIL PROTECTED]> writes:
> See my remarks on the Lisp for the Twenty First Century
> http://www.lambdassociates.org/lC21.htm
Anyone who didn't love lisp in the 20th century has no heart.
Anyone who still loves it in the 21st, has no head.
--
http://mail.python.org/mailman/listinfo/
> It is worth noting that eager, statically-typed languages like OCaml and F#
> are many times faster than the other languages at this task. This is
> precisely the forte of OCaml and F#, manipulating trees and graphs.
To be fair, it is also worth noting that both the OCaml and F#
implementations
In <[EMAIL PROTECTED]>, Thomas Nelson
wrote:
> On May 4, 7:59 am, [EMAIL PROTECTED] wrote:
>> Let me retype my question: what I 'dir()' in case of 'pyuno' type
>> instance?
>> Or in case of 'dict' type instance? Or in case of any other new python
>> type?
>
class Foo:
> ... def f(self,x)
Alex Martelli wrote:
> "Type-switching" in this way is a rather dubious practice in any
> language (it can't respect the "open-closed" principle). Can't you have
> those objects wrapped in suitable wrappers with a "copyorwrite" method
> that knows what to do? For example, StringIO.StringIO is a s
On May 4, 8:52 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Chris
> > Subject: Re: Strange terminal behavior after quittingTkinter
> application
> > Clicking 'Quit' or on the window's 'x' causes the application to quit
> > without messing up the termi
Ben Collver <[EMAIL PROTECTED]> wrote:
> Chris Mellon wrote:
> > You should "check" for the methods by calling them. If the object
> > doesn't support the method in question, you will get a runtime
> > exception. Premature inspection of an object is rarely useful and
> > often outright harmful.
>
Thomas Nelson <[EMAIL PROTECTED]> wrote:
> I want to generate all the fractions between 1 and limit (with
> limit>1) in an orderly fashion, without duplicates.
>
> def all_ratios(limit):
> s = set()
> hi = 1.0
> lo = 1.0
> while True:
> if hi/lo not in s:
> s.a
Chris Mellon <[EMAIL PROTECTED]> wrote:
> > > I am unqualified to comment on the Python philosophy, but I would like
> > > for my function to do some basic error checking on its arguments.
> >
> > By "basic error checking" I mean "verify that the file argument actually
> > is a file-like object".
Chris Mellon wrote:
> You should "check" for the methods by calling them. If the object
> doesn't support the method in question, you will get a runtime
> exception. Premature inspection of an object is rarely useful and
> often outright harmful.
That makes sense, thank you for the response.
What
1 - 100 of 182 matches
Mail list logo