Hi all,
to facilitate discussion about porting Python code between different versions
(mainly of course from 2.x to 3.x), we've created a new mailing list
[EMAIL PROTECTED]
It is a public mailing list open to everyone. We expect active participation
of many people porting their
I've just released lockfile 0.6. This version supports Python 2.4, 2.5, 2.6
and 3.0. It also expands the unit tests a bit.
What is lockfile?
The lockfile module exports a FileLock class which provides a simple API
for locking files. Unlike the Windows msvcrt.locking function, the
Steven D'Aprano wrote:
On Fri, 05 Dec 2008 20:35:07 -0800, James Stroud wrote:
Daniel Fetchinson wrote:
I'd like this new way of defining methods, what do you guys think?
Consider the maverick who insists on
class C:
def me.method(arg):
self.value = arg
Replace self with me.
try this:
import this
and look at the 15th line...
I agree that for newcomers to Python, the class method definition might
seem strange. I certainly had problems with it when starting with
Python, coming from Java. But in the meantime it feels right. I don't
know if it is because I'm used to
Hallo,
users in this forum has been kind enough to point out. Only my
implementations are often not that clean, and I may call things
something different than the normal convention, which is a source of
confusion for myself and others trying to communicate with me.
I think, you should start
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I'm strongly against this. This looks ugly and reminds me of Perl and
Ruby. (I don't have anything against these languages, but there's a
reason I use Python).
Russ P.
On Sat, 06 Dec 2008 09:56:12 +0100, Antoine De Groote wrote:
try this:
import this
and look at the 15th line...
The reason why I'm against that change too. It adds a second,
alternative way to express something that is already in the language.
I agree that for newcomers to Python, the
Ok. I built the source on an openSUSE 11.0 system. I used 'sudo make
altinstll'. It created an executable /usr/local/bin/python3.0 file.
Nothing was touched in /usr/bin.
Ah, then you missed the fun part. Take a look at the install: target
in the Makefile.
I need to start writing some code
Lawrence D'Oliveiro [EMAIL PROTECTED] writes:
In message [EMAIL PROTECTED], Aaron Brady wrote:
On Dec 5, 4:32 am, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
The code people write is probably a direct reflection of their thinking
processes: For example, slow,
On Sat, 06 Dec 2008 20:28:17 +1300 Lawrence D'Oliveiro
[EMAIL PROTECTED] wrote:
Does that make any sense to you, or should I start drawing simple
diagrams?
People, please! Is some civility too much to ask?
/W
--
My real email address is constructed by swapping the domain with the
recipient
On 6 Dec 2008 09:18:20 GMT Marc 'BlackJack' Rintsch [EMAIL PROTECTED]
wrote:
On Sat, 06 Dec 2008 09:56:12 +0100, Antoine De Groote wrote:
[snip reference to preferably only one way to do it]
The reason why I'm against that change too. It adds a second,
alternative way to express
On Dec 6, 1:52 am, mete bilgin [EMAIL PROTECTED] wrote:
Hi all,
I try to make a websevice with python and mod_python. İ try to make a po
files, but i can not reach them in the page. When i ask the page like
os.listdir('.') but i want to get files directory, what can i do? sorry
for my bad
Hi,
have anyone using this release of NetBeans (6.5 with Python support)
with Python 3 without any problems ? I mean, does it work with Python3
or only with 2.x ?
--
http://mail.python.org/mailman/listinfo/python-list
but i want to take it somewhere else...i want to it work some other path in
other system.
On Saturday 06 December 2008 12:34:07 Graham Dumpleton wrote:
On Dec 6, 1:52 am, mete bilgin [EMAIL PROTECTED] wrote:
Hi all,
I try to make a websevice with python and mod_python. İ try to make a po
On Dec 3, 10:06 am, r [EMAIL PROTECTED] wrote:
If we can laugh what else would we do
I'd like to touch also on some comments by ajaksu:
[ajaksu]
I'd like to try hacking some form of Python to work in SketchUp (on
top of Ruby, that is). Now, why won't I try to? I'm a Linux user and
we don't
On Dec 5, 7:20 pm, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
In message [EMAIL PROTECTED], Aaron Brady wrote:
On Dec 5, 4:32 am, Lawrence D'Oliveiro [EMAIL PROTECTED]
central.gen.new_zealand wrote:
The code people write is probably a direct reflection of their
Istvan Albert wrote:
A previous poster suggested that in this case the slowdown is caused
by the new io code being written in python rather than C.
For text mode Python 3's write() method is slower than Python 2.x's
method because all text is encoded. The slowdown is mostly caused by
Antoine De Groote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I think this (that is just sugar) may be a little better:
class C:
def method($, arg):
$value = arg
Or even this, combined with the
Hi,
I'd like to insert Multiple Records Using One Insert Statement
inserting one record using one insert statement works
this is the example:
import MySQLdb
conn = MySQLdb.connect(host=localhost,.)
cursore = conn.cursor()
cursore.execute('INSERT INTO frutta (nome, quantita) VALUES(%s, %s)',
On Dec 5, 8:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not currently possible).
Ruby uses @ and @@ for similar purposes.
I agree that the code looks worse, but also shorter to read and
On Sat, 6 Dec 2008 13:32:58 +0100 Andreas Waldenburger
[EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED]
suggested:
class C:
def $method(arg):
$value = arg
[snip]
[snip]
self is a speaking identifier, $ isn't.
Also, nothing
On Sat, 2008-12-06 at 04:03 -0800, [EMAIL PROTECTED] wrote:
Hi,
I'd like to insert Multiple Records Using One Insert Statement
inserting one record using one insert statement works
this is the example:
import MySQLdb
conn = MySQLdb.connect(host=localhost,.)
cursore = conn.cursor()
Steven D'Aprano wrote:
cut
import os, fcntl
oldname = ham.txt
newname = spam.txt
def lock_destination(name):
fileno = os.open(name, os.O_CREAT | os.O_EXCL)
fcntl.flock(fileno, fcntl.LOCK_EX) # POSIX systems only
return fileno
# Create a test file to be renamed.
f = open(oldname,
I'm planning to start learning Python now, using Python 3000.
I have no previous Python skills, but I now Perl pretty well.
I'm also well experienced with JavaScript.
Any pointers and tips how I should go about getting into
Python?
--
Bertilo Wennergren http://bertilow.com
--
Glenn Linderman wrote:
On approximately 12/1/2008 11:29 PM, came the following characters from
the keyboard of Martin v. Löwis:
It would be nice if the ftypes were version specific as created by the
installer; IIRC, I created the above three from the ftype Python.File as
I installed each
Hi,
One of my 'non technical' friends complained about knowing nothing at
all about programming (though using computers regularly for mails / web
browsing / googling and downloading / cropping photos )
He wants to play a little with programming to stimulate parts of his
otehrwise idle brain
On Dec 6, 2:22 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
I see your wink, but, please, did you read that thread started by r
about the Ruby API for some piece of Google software? That was so
offensively fanboyish that I almost removed Python from my computer.
The one
[EMAIL PROTECTED] wrote:
Antoine De Groote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I think this (that is just sugar) may be a little better:
class C:
def method($, arg):
$value = arg
SciTE doesn't do that, in the default configuration it just uses
whatever is called pythonw on the path, for running files having a .py
or .pyw suffix.
I see. By default, Python does not put itself onto PATH. Does that mean
that SciTE cannot run Python scripts in the default installation?
In article [EMAIL PROTECTED],
Bertilo Wennergren [EMAIL PROTECTED] wrote:
I'm planning to start learning Python now, using Python 3000.
I have no previous Python skills, but I now Perl pretty well.
I'm also well experienced with JavaScript.
Any pointers and tips how I should go about
Aaron Brady wrote:
On Dec 5, 8:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and
James Stroud jst...bi.ucla.edu wrote:
Consider the maverick who insists on
8example with me instead of self
What's the interpreter going to do with our maverick's code?
Took me a while, but after I remembered that a maverick
is an unmarked, wild member of the bovine species
Ben Finney [EMAIL PROTECTED] wrote:
I hereby recommend “pish and tosh” for use by anyone who wants to
counter someone's point. It beats by a country furlong the invective
that has become regrettably common here in recent months.
I second the motion to use pish and tosh for a first level of
Roy Smith wrote:
Bertilo Wennergren [EMAIL PROTECTED] wrote:
I'm planning to start learning Python now, using Python 3000.
I have no previous Python skills, but I now Perl pretty well.
I'm also well experienced with JavaScript.
Any pointers and tips how I should go about getting into
Daniel Fetchinson wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is a
Hi all,
When I try to import a module via __import__, I am facing
ImportError. But, when I tried to import it via usual 'import', it
worked fine.
Please see below:
try:
import exact
except:
logging.exception('Error during importing')
On Dec 5, 7:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
Driving and Car Maintenance Transportation accounts for 66% of U.S.
oil use -mainly in the form of gasoline. Luckily, there are plenty of
ways to improve gas mileage.
Driving Tips:- Idling gets you 0 miles per gallon. The best way to
warm up a vehicle is to drive it. No more than 30 seconds of
2008/12/5 Hendrik van Rooyen [EMAIL PROTECTED]:
I second the motion to use pish and tosh for a first level of disagreement.
I recommend the rather archaic Balderdash as the next step in the
escalation of disagreement...
http://bash.org/?23396
--
Dotan Cohen
http://what-is-what.com
Hi, all. I've done some poking around, and can find roughly two million
different ways to attach attachments to an e-mail... but darn few to
detach them. Any suggestions? I'm assuming I'm just missing looking in
The Right Place, but thus-far, my Googling has been for naught.
Thanks!
-Ken
--
Yes, there is an excellent book for absolute beginners call Python
Programming, for the absolute beginner (second edition by Michael
Dawson.
Here are the reasons why it is excellent for a beginner.
It doesn't go beyong basic math as do most other computer books when
giving examples, exercises or
On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I'm strongly against this. This looks ugly and reminds me of Perl and
Ruby. (I don't have anything
Bertilo Wennergren wrote:
Roy Smith wrote:
Bertilo Wennergren [EMAIL PROTECTED] wrote:
I'm planning to start learning Python now, using Python 3000.
I have no previous Python skills, but I now Perl pretty well.
I'm also well experienced with JavaScript.
Any pointers and tips how I should
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not currently possible).
Ruby uses @ and @@ for similar purposes.
On Dec 6, 4:37 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 13:32:58 +0100 Andreas Waldenburger
[EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED]
suggested:
class C:
def $method(arg):
$value = arg
[snip]
On Sat, 06 Dec 2008 07:15:27 -0800, Russ P. wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not currently
On Sat, 06 Dec 2008 08:50:20 -0500, Roy Smith wrote:
For your first
project, pick something that's small enough that you think you could
tackle it in under 50 lines of Perl.
Is there anything which *can't* be written in under 50 lines of Perl?
:-)
One of the very first things you'll
Daniel Fetchinson a écrit :
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python is
Russ P. wrote:
On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I'm strongly against this. This looks ugly and reminds me of Perl and
Ruby. (I don't
On Dec 6, 7:34 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Sat, 06 Dec 2008 07:15:27 -0800, Russ P. wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def
[EMAIL PROTECTED] a écrit :
Hallo,
users in this forum has been kind enough to point out. Only my
implementations are often not that clean, and I may call things
something different than the normal convention, which is a source of
confusion for myself and others trying to communicate with me.
Hello all,
I use cvs to maintain all my python snippets, notes, c, c++ code.
As the hosting provider provides a public webserver also, I was
thinking that I should convert the cvs folders automatically to
website.
1) cvs2web is not what i mean.
2) doxygen may not be suitable.
I tried with
[EMAIL PROTECTED] schrieb:
2 problems: endianness and trailing zer byte.
This works for me:
This is very strange - when using utf16, endianness should be detected
automatically. When I simply truncate the trailing zero byte, I receive:
Traceback (most recent call last):
File ./modify.py,
On Sat, 2008-12-06 at 10:57 +0100, Martin v. Löwis wrote:
Ok. I built the source on an openSUSE 11.0 system. I used 'sudo make
altinstll'. It created an executable /usr/local/bin/python3.0 file.
Nothing was touched in /usr/bin.
Ah, then you missed the fun part. Take a look at the
Steven D'Aprano:
If a line of code uses too many instance attributes to fit comfortably on
a line, spread it over two lines. There is no newline shortage, they are
a renewable resource.
Splitting lines is generally possible, but sometimes it's not I want,
for example to keep a formula whole.
John Machin schrieb:
On Dec 6, 5:36 am, Johannes Bauer [EMAIL PROTECTED] wrote:
So UTF-16 has an explicit EOF marker within the text? I cannot find one
in original file, only some kind of starting sequence I suppose
(0xfeff). The last characters of the file are 0x00 0x0d 0x00 0x0a,
simple
Johannes Bauer wrote:
[EMAIL PROTECTED] schrieb:
2 problems: endianness and trailing zer byte.
This works for me:
This is very strange - when using utf16, endianness should be detected
automatically. When I simply truncate the trailing zero byte, I receive:
Traceback (most recent call
[Lie]
Sketchup's target users is not power users but those who need quick
sketches, so scripting isn't an extremely important feature in
Sketchup.[/Lie]
Your Wrong, SketchUp PRO is marketed at ACAD users and other high
profile CAD and CAM applications. SketchUp models can be exported to
ACAD and
Dear All,
For the first time I have come across a Python feature that seems
completely wrong. After the introduction of rich comparisons, equality
comparison does not have to return a truth value, and may indeed return
nothing at all and throw an error instead. As a result, code like
if foo ==
On Dec 6, 12:25 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
The rename works, but here is my problem: after getting what I thought
was an exclusive lock on the new file, but before calling os.rename(), I
can still over-write it from another process:
$ echo this comes from
On Dec 6, 8:16�am, Wolfgang Strobl [EMAIL PROTECTED] wrote:
Dennis Lee Bieber [EMAIL PROTECTED]:
On 05 Dec 2008 05:21:25 GMT, Steven D'Aprano
[EMAIL PROTECTED] declaimed the following in
comp.lang.python:
On Thu, 04 Dec 2008 08:44:19 -0800, Matimus wrote:
The point was that there
is
Bad idea having two ways to do this. Pick one or the other!
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 5, 12:29 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Ben Finney [EMAIL PROTECTED] wrote:
I hereby recommend “pish and tosh” for use by anyone who wants to
counter someone's point. It beats by a country furlong the invective
that has become regrettably common here in recent months.
On Dec 6, 2008, at 11:42 AM, [EMAIL PROTECTED] wrote:
class ThisIsAClass:
def $some_method(arg1, arg2):
$value = arg1 + $foo + $bar + $baz * arg2
...
I think my biggest problem with this is what got me off Perl.
Add $, together with already used @ and maybe some other
identifiers
In article [EMAIL PROTECTED],
Bertilo Wennergren [EMAIL PROTECTED] wrote:
I don't suppose there is any introductory material out there that is
based on Python 3000 and that is also geared at people with a Perl
background? Too early for that I guess..
Honestly, the differences between 2.x and
Hi,
just starting programming and have an elementary question after playing around
with lists but cannot find the answer with googling.
I have a list of variables and I would like some of those variables to be
integers and some to be operators so the list would look something like [5 *
4 - 4 +
Mensanator wrote:
On Dec 6, 8:16�am, Wolfgang Strobl [EMAIL PROTECTED] wrote:
Dennis Lee Bieber [EMAIL PROTECTED]:
On 05 Dec 2008 05:21:25 GMT, Steven D'Aprano
[EMAIL PROTECTED] declaimed the following in
comp.lang.python:
On Thu, 04 Dec 2008 08:44:19 -0800, Matimus wrote:
The point was
Mensanator wrote:
On Dec 5, 12:29 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Ben Finney [EMAIL PROTECTED] wrote:
I hereby recommend “pish and tosh” for use by anyone who wants to
counter someone's point. It beats by a country furlong the invective
that has become regrettably common here
Daniel Fetchinson wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future version of python
Daniel Fetchinson wrote:
The proposal is to allow this:
class C:
def self.method( arg ):
self.value = arg
return self.value
instead of this:
class C:
def method( self, arg ):
self.value = arg
return self.value
Hmm,
I'd give the proposal a
Neal Becker wrote:
Daniel Fetchinson wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and new) in a future
I fully agree with Roy's answer.
COding small tasks is a good starting point. For quite some time you'll
be of course less efficient than with your previous language, but that's
part of the learning curve, isn't it.
I guess you'll learn the syntax rather quickly.
What's more painful is to learn
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Aahz)
wrote:
In article [EMAIL PROTECTED],
Bertilo Wennergren [EMAIL PROTECTED] wrote:
I don't suppose there is any introductory material out there that is
based on Python 3000 and that is also geared at people with a Perl
background? Too
En Wed, 03 Dec 2008 16:20:27 -0200, David Shi [EMAIL PROTECTED]
escribió:
I am looking for a concise working example of Python script calling COM
compliant .dll.
The best source of information is Mark Hammond's book Python Programming
in Win32.
The sample chapters available are about
macc_200 wrote:
Hi,
just starting programming and have an elementary question after playing
around with lists but cannot find the answer with googling.
I have a list of variables and I would like some of those variables to
be integers and some to be operators so the list would look something
News123 wrote:
What's more painful is to learn which functianilty is in which library
and which library exists.
cut
Yes and one mistake I still often find myself doing is, when confronted
with a particular problem, that I write some helper code to deal with
it. Of course later on I discover
In article [EMAIL PROTECTED],
Steven D'Aprano [EMAIL PROTECTED] wrote:
On Sat, 06 Dec 2008 08:50:20 -0500, Roy Smith wrote:
For your first
project, pick something that's small enough that you think you could
tackle it in under 50 lines of Perl.
Is there anything which *can't* be
Johannes Bauer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
John Machin schrieb:
On Dec 6, 5:36 am, Johannes Bauer [EMAIL PROTECTED] wrote:
So UTF-16 has an explicit EOF marker within the text? I cannot find one
in original file, only some kind of starting sequence I suppose
[EMAIL PROTECTED] writes on Wed, 3 Dec 2008 07:13:14 -0800 (PST):
To clarify again,
Is there some function like profile.PrintStats() which dynamically
shows the stats before stopping the Profiler?
Try to (deep) copy the profiler instance and than call PrintStats()
on the copy.
Of course, you
Date: Fri, 05 Dec 2008 22:22:38 -0800
From: Dennis Lee Bieber [EMAIL PROTECTED]
Subject: Re: as keyword woes
To: python-list@python.org
Message-ID: [EMAIL PROTECTED]
I'm still in the dark as to what type of data could
even inspire the
use of as as an object name... A collection
2008/12/6 News123 [EMAIL PROTECTED]:
No my question does anybody know a nice beginners book (or a learning CD
or on line tutorial)? Ideally it shouldn't be too serious and have a lot
of small nice mini-examples
How to Think Like a Computer Scientist - Learning with Python is a
good book for
Rasmus Fogh wrote:
Dear All,
For the first time I have come across a Python feature that seems
completely wrong. After the introduction of rich comparisons, equality
comparison does not have to return a truth value, and may indeed return
nothing at all and throw an error instead. As a result,
Ken D'Ambrosio wrote:
Hi, all. I've done some poking around, and can find roughly two million
different ways to attach attachments to an e-mail... but darn few to
detach them. Any suggestions? I'm assuming I'm just missing looking in
The Right Place, but thus-far, my Googling has been for
In my opinion, this thread is a crock of balony.
Python *occasionally* adds keywords after giving a warning or requiring
a future import in previous versions.
In 2.2, one had to 'from __future__ import generators' to make a
generator because doing so required the new 'yield' keyword.
In
On Dec 6, 1:38 pm, Warren DeLano [EMAIL PROTECTED] wrote:
There, I assert that 'object.as(class_reference)' is the simplest and
most elegant generalization of this widely-used convention. Indeed, it
is the only obvious concise answer, if you are limited to using methods
for casting.
I don't
On Dec 7, 2:38 am, Warren DeLano [EMAIL PROTECTED] wrote:
Date: Fri, 05 Dec 2008 22:22:38 -0800
From: Dennis Lee Bieber [EMAIL PROTECTED]
Subject: Re: as keyword woes
To: [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
I'm still in the dark as to what type of data could
even
News123 wrote:
One of my 'non technical' friends complained about knowing nothing at
all about programming (though using computers regularly for mails / web
browsing / googling and downloading / cropping photos )
He wants to play a little with programming to stimulate parts of his
otehrwise
On Sat, Dec 6, 2008 at 11:38 AM, Warren DeLano [EMAIL PROTECTED] wrote:
[...]
There, I assert that 'object.as(class_reference)' is the simplest and
most elegant generalization of this widely-used convention. Indeed, it
is the only obvious concise answer, if you are limited to using methods
On Dec 6, 5:00 am, Bertilo Wennergren [EMAIL PROTECTED] wrote:
I'm planning to start learning Python now, using Python 3000.
I have no previous Python skills, but I now Perl pretty well.
I'm also well experienced with JavaScript.
Any pointers and tips how I should go about getting into
I got an interrupted system call exception in select and I don't know
what could have caused it. Here's the error:
select.select(inputs, [], [], 9)
error: (4, 'Interrupted system call')
Caught an exception, shutting down...
It's py2.3, on mach architecture.
I'm trying to figure out what
On Dec 6, 12:30 pm, Roy Smith [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Aahz)
wrote:
In article [EMAIL PROTECTED],
Bertilo Wennergren [EMAIL PROTECTED] wrote:
I don't suppose there is any introductory material out there that is
based on Python 3000 and
Christian Heimes wrote:
Istvan Albert wrote:
A previous poster suggested that in this case the slowdown is caused
by the new io code being written in python rather than C.
For text mode Python 3's write() method is slower than Python 2.x's
method because all text is encoded. The slowdown is
On Dec 6, 12:47 am, Patrick Mullen [EMAIL PROTECTED] wrote:
Could I do something like this:
def a.add(b): return a+b
Outside of a class? Of course then that makes you think you could do
5.add(6) or something crzy like that. (I mean, you can do
(5).__add__(6) but that's something else
On Dec 6, 9:15 am, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not
first time in the internet history a huge collection of funny pictures
and videos
over 1 funny pics and videos download free on mobile format
www.funreality.com
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 6, 9:12 am, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 1:02 am, Antoine De Groote [EMAIL PROTECTED] wrote:
Allowing $ as a substitute for self wouldn't require this new syntax.
class C:
def method($, arg):
$.value = arg
I'm strongly against this. This looks ugly
On Dec 5, 8:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
Hi folks,
The story of the explicit self in method definitions has been
discussed to death and we all know it will stay. However, Guido
himself acknowledged that an alternative syntax makes perfect sense
and having both (old and
Steven D'Aprano wrote:
I'm trying to safely rename a file without over-writing any existing
files, and I've run into a problem with file locks. Here's a naive way of
renaming without over-writing
By default on a Linux filesystem, flock() gives you an _advisory_ lock.
Other processes can touch
On Dec 7, 6:20 am, Mark Tolonen [EMAIL PROTECTED] wrote:
Johannes Bauer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
John Machin schrieb:
On Dec 6, 5:36 am, Johannes Bauer [EMAIL PROTECTED] wrote:
So UTF-16 has an explicit EOF marker within the text? I cannot find one
in
1 - 100 of 287 matches
Mail list logo