On Jan 17, 10:25 am, Tino Wildenhain t...@wildenhain.de wrote:
[[int(x) for x in line.split()] for line in open(blob.txt)]
Nice (python code).
Few comments:
• the above code is borderline of atypical. e.g. it is not a average
python code would produce or one'd seen in corporate python code.
On Jan 17, 8:12 am, Jeff McNeil j...@jmcneil.net wrote:
On Jan 17, 11:09 am, Jeff McNeil j...@jmcneil.net wrote:
On Jan 17, 10:50 am, Martin v. Löwis mar...@v.loewis.de wrote:
So, the documentation states that ob_type is a pointer to the type's
type, or metatype. Rather, this is a
Context - http://docs.python.org/3.0/reference/datamodel.html?highlight=data
model#object.__iadd__
Just a suggestion I thought I'd throw out... There's a restriction in
the language implementation on exactly what can go the left of an
augmented arithmetic expression.
For example:
a = 3
a **=
Lawson Hanson wrote:
So is there any way to get Python to import the named module
without just doing from dummy import *, because I will
not know that the user wants to use the dummy module
until run-time ... I'm trying to import control data
for different run scenarios which
On Sun, Jan 18, 2009 at 2:56 AM, andrew cooke and...@acooke.org wrote:
Context - http://docs.python.org/3.0/reference/datamodel.html?highlight=data
model#object.__iadd__
Just a suggestion I thought I'd throw out... There's a restriction in
the language implementation on exactly what can go
Therefore, Python requires you to rewrite the code in some other way
that makes your intentions more clear. For instance, why not use the
operator instead?
Right, but you're guessing what the context is. Within a DSL it often
makes a lot of sense to use operators for reasons that weren't
Riley Porter írta:
Hello all,
This is the first time I have posted to this group. That being said
if I am in the wrong place for this kind of support please let me know.
OK,
So I am writing a log parsing program and wish to allow for the
community to write parsers. Basically, what I
On Jan 17, 3:55 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
Both very good points, but consider that you're not comparing apples with
apples.
__import__(os, fromlist=[system])
module 'os' from '/usr/lib/python2.5/os.pyc'
system
Traceback (most recent call last):
Since this is a PyPy bashing thread, maybe it's an appropriate place
to suggest that the project has got a little bit waylaid by exploring
cool things instead of releasing a useful final result?
I am not questioning rpython directly - the case for something like
that is obvious. But there's a
On Jan 18, 2:02 pm, Terry Reedy tjre...@udel.edu wrote:
John Machin wrote:
On Jan 18, 9:10 am, Terry Reedy tjre...@udel.edu wrote:
Martin v. Löwis wrote:
Does he intend to maintain two separate codebases, one 2.x and the
other 3.x?
I think I have no other choice.
Why? Is theoretically
Hey,
I'm new with database interactions in Python and I'm not sure if I'm
handling the cursor and transactions correctly:
cursor = db.cursor(MySQLdb.cursors.DictCursor)
cursor.execute(flate_rate_pkgs_sql)
rows = cursor.fetchall()
#I have for loop here to iterate over rows
On Sun, Jan 18, 2009 at 3:42 AM, andrew cooke and...@acooke.org wrote:
Therefore, Python requires you to rewrite the code in some other way
that makes your intentions more clear. For instance, why not use the
operator instead?
Right, but you're guessing what the context is. Within a DSL it
Not sure if you were saying this, but the underlying technical reason
for this issue is that they are treated as assignment rather than
operators in the language spec -
http://docs.python.org/3.0/reference/simple_stmts.html#augmented-assignment-statements
I think this explains why they are not
On Jan 18, 9:01 am, Chris Rebert c...@rebertia.com wrote:
Indeed. Python happens to in this case draw the line at using the
augmented assignment operators for non-assignment. I personally see
this as reasonable because the = symbol has a consistent meaning in
Python (assignment) whereas the
On Sun, 18 Jan 2009 04:24:04 -0800, andrew cooke wrote:
my argument was that *= is not treated as = and *, but as a completely
new operator (the docs even say that the implementation need not return
self which suggests some pretty extreme semantics were envisaged).
What do you mean by
hello,
I wonder if there's something like a module decorator.
I could use it in debugging a large highly dynamical program.
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 18, 9:40 am, Marc 'BlackJack' Rintsch bj_...@gmx.net wrote:
On Sun, 18 Jan 2009 04:24:04 -0800, andrew cooke wrote:
my argument was that *= is not treated as = and *, but as a completely
new operator (the docs even say that the implementation need not return
self which suggests some
On Jan 18, 9:56 am, andrew cooke and...@acooke.org wrote:
either i have misundertstood you
ah, i see your point. sorry, andrew
--
http://mail.python.org/mailman/listinfo/python-list
hello,
I wonder if there's something like a module decorator.
I could use it in debugging a large highly dynamical program.
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
Stef Mientki schrieb:
hello,
I wonder if there's something like a module decorator.
I could use it in debugging a large highly dynamical program.
No, there isn't. This has been discussed a while ago:
http://groups.google.de/group/comp.lang.python/browse_thread/thread/215216a1e13ba2c6
Diez
Diez B. Roggisch wrote:
Stef Mientki schrieb:
hello,
I wonder if there's something like a module decorator.
I could use it in debugging a large highly dynamical program.
No, there isn't. This has been discussed a while ago:
http://bugs.python.org/issue4986
Sorry for the noise,
Andrew
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 18, 6:56 am, andrew cooke and...@acooke.org wrote:
On Jan 18, 9:40 am, Marc 'BlackJack' Rintsch bj_...@gmx.net wrote:
On Sun, 18 Jan 2009 04:24:04 -0800, andrew cooke wrote:
my argument was that *= is not treated as = and *, but as a completely
new operator (the docs even say that
Wow! That was an instant classic! I just have a couple of points to
add.
The suggestion was made (not by you) that data hiding is worthless
because it can be defeated anyway. According to that kind of
reasoning, locks are worthless because they can be picked, cut, or
just blown off. I know that
The goals are listed here:
http://codespeak.net/pypy/dist/pypy/doc/architecture.html
Speed is mentioned, but as a secondary concern. The main goal seems to
be to create a vehicle into exploring the concept of dynamic languages
themselves. If that seems amorphous then it is because it is a
I expected that py3 did not converted the b'...' indication too ?
b'afc76815e3fc429fa9d7'
--
http://mail.python.org/mailman/listinfo/python-list
Feature? the output of below Hello program he0.py started from command
line looks as follows:
F:\prompthe0.py
Hello
F:\prompt
'Hello' was sent with sys.stdout.write, so without newline.
But why cannot be output (more logically):
F:\prompthe0.py
HelloF:\prompt
Is it normal? Is there any means or
Wow, impressive responses.
It sounds like the general consensus is that English would not be a good
choice for programming even if there were an interpreter capable of
turning human language into machine language. But that makes sense; even
English professionals have trouble understanding each
in python3.0 this does not work
File /usr/python/lib/python3.0/email/feedparser.py, line 99, in push
data, self._partial = self._partial + data,
TypeError: Can't convert 'bytes' object to str implicitly
So what do i need to wrap around environ['wsgi.input'] so it does
work ?
--
AEXÍúA»êà´AEXÍúɽ¿Í¼ÊµÄ¢Ü·
±ÌA'AE®'
(http://www.pwblog.com/user/xru01/syusyoku/)ÍÀåïÌwÍÅÍæèØé±Æª¢ïƾíêĢܷB
I saw some code where someone is really managed to import braces from
__future__. ;)
def test():
#{
print hello
#}
--
http://mail.python.org/mailman/listinfo/python-list
Improved link -
http://docs.python.org/3.0/reference/datamodel.html#object.__iadd__
--
http://mail.python.org/mailman/listinfo/python-list
I would like to do:
def foo(self,x,y=self.a)
where the default value for y=self.a. Since this is not possible, I
wind up doing
def foo(self,x,y=None)
if not y:
y=self.a
but that seems kind of clumsy.
Is there a better way to do this?
Thanks in advance
--
IIRC, Windows automatically add a newline after the program output.
On Fri, Jan 16, 2009 at 4:24 PM, Jean-Paul VALENTIN
jean-paul.valen...@ingenico.com wrote:
Feature? the output of below Hello program he0.py started from command
line looks as follows:
F:\prompthe0.py
Hello
F:\prompt
Alan G Isaac wrote:
Is it intentional that ``exec`` cannot handle a TextIOWrapper?
Bottom line: has ``execfile(filename)`` really become
``exec(open(filename).read())``? Is this a good thing?
On 1/17/2009 4:20 PM Terry Reedy apparently wrote:
Yes. Yes.
Alan G Isaac wrote:
OK. Why?
On Jan 18, 8:19 am, Reckoner recko...@gmail.com wrote:
I would like to do:
def foo(self,x,y=self.a)
where the default value for y=self.a. Since this is not possible, I
wind up doing
def foo(self,x,y=None)
if not y:
y=self.a
but that seems kind of clumsy.
Is there a better way
On Sun, 18 Jan 2009 06:19:03 -0800, Reckoner wrote:
I would like to do:
def foo(self,x,y=self.a)
where the default value for y=self.a. Since this is not possible, I wind
up doing
def foo(self,x,y=None)
if not y:
y=self.a
but that seems kind of clumsy.
It's also
I am developing for PyS60 1.4.4 which supports Python 2.2.2 while what
I know is Python 2.5 .
Can you please tell me differences between the two so that I can save
myself from incompatible code.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 18 Jan 2009 14:36:15 +, Alan G Isaac wrote:
Well, that does not really answer my question, imo. I do not much care
about the disappearance of ``execfile``. I was asking, why is it a
**good thing** that ``exec`` does not accept a TextIOWrapper?
I'm not sure if this is a stupid
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
def foo(self, x, y=None):
if y is None:
y = self.a
I don't find that clumsy in the least. I find it perfectly readable and a
standard idiom.
That has the same problem as the earlier version. If the person
passes
On Jan 16, 8:24 am, Jean-Paul VALENTIN Jean-
paul.valen...@ingenico.com wrote:
Feature? the output of below Hello program he0.py started from command
line looks as follows:
F:\prompthe0.py
Hello
F:\prompt
'Hello' was sent with sys.stdout.write, so without newline.
But why cannot be output
On Sun, 18 Jan 2009 07:30:52 -0800, Ravi wrote:
I am developing for PyS60 1.4.4 which supports Python 2.2.2 while what I
know is Python 2.5 .
Can you please tell me differences between the two so that I can save
myself from incompatible code.
Everything new mentioned here:
On Jan 18, 8:56 am, andrew cooke and...@acooke.org wrote:
Since this is a PyPy bashing thread, maybe it's an appropriate place
to suggest that the project has got a little bit waylaid by exploring
cool things instead of releasing a useful final result?
I am not questioning rpython directly -
On Jan 18, 9:36 am, Paul Rubin http://phr...@nospam.invalid wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
def foo(self, x, y=None):
if y is None:
y = self.a
I don't find that clumsy in the least. I find it perfectly readable and a
standard idiom.
Hi list. I use 'type' to generate classes but have a need to order
the attributes for the generated class. Of course a dict is not going
to maintain ordering. Is there any way to dynamically generate a
class with attributes in specific order?
my_new_class = type( 'MyNewClass',
Hussein B wrote:
Hey,
I'm new with database interactions in Python and I'm not sure if I'm
handling the cursor and transactions correctly:
cursor = db.cursor(MySQLdb.cursors.DictCursor)
cursor.execute(flate_rate_pkgs_sql)
rows = cursor.fetchall()
#I have for loop here to iterate
On Jan 18, 9:52 am, David Pratt fairwinds...@gmail.com wrote:
Hi list. I use 'type' to generate classes but have a need to order
the attributes for the generated class. Of course a dict is not going
to maintain ordering. Is there any way to dynamically generate a
class with attributes in
Paul Rubin a écrit :
Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr writes:
Once again, there's quite a lot to learn from
the story of Ariane 5.
Do you know what actually happened with Ariane 5?
*yes I do* - else I wouldn't mention it. Thanks.
The failure was
because smart
Hello again,
Thanks for previous help on Start two threads in same time it was
useful,but when I run this
two threads, I think they don't start at the same time, here is my
code snippet:
import threading
class ThreadedClass1(threading.Thread):
def __init__(self):
* asit (Sat, 17 Jan 2009 13:28:12 -0800 (PST))
Recently I was coding a link extractor. It's a command line stuff and
takes parameter as argument.
I found that the in operator is not always helpful.
eg. if --all in sys.argv:
print all links will be printed
its not helpful when
Russ P. a écrit :
On Jan 17, 1:43 pm, Paul Rubin http://phr...@nospam.invalid wrote:
Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr writes:
Once again, there's quite a lot to learn from
the story of Ariane 5.
Do you know what actually happened with Ariane 5? The failure was
alex23 wuwe...@gmail.com wrote:
I must confess I've rarely had a need to use __import__ and don't
think I've ever used the fromlist arg. I'm confused, though, because
the docstring states:
The fromlist should be a list of names to emulate ``from name
import ...''
But it also states
Hi Aaron. Yeah, definitely sounds like a possibility. I was able to
locate an ordered dict implementation that subclasses dict. This
might work fine. Might be able to pass into type method directly
since I think that dict passed into type is setting __dict__ I
believe. Let you know if
Russ P. russ.paie...@gmail.com writes:
I don't know which variant of Ada was used here, but something called
the Ravenscar Profile is a reduced subset of Ada that might have
prevented this error (though I haven't verified this). Then there is
Spark Ada, which supposed to be much safer than
Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr writes:
As I already stated, no technology can protect us from this kind of
error. Ask yourself why this module was reused as-is, instead of going
thru the whole specs / tests / QA process again, and *perhaps* you'll
start to
Simon Forman wrote:
I want to take a webpage, find all URLs (links, img src, etc.) and
rewrite them in-place, and I'd like to do it in python (pure python
preferred.)
lxml.html has functions specifically for this problem.
http://codespeak.net/lxml/lxmlhtml.html#working-with-links
Code would
Coming from a perl background I'm new to the Python world. I need to
read a list of values, send each value to an external program and
capture and act on the output of that program. Reading and parsing the
initial values is not a problem but I can't seem to find anything on
the sending to and
vedrandeko...@yahoo.com wrote:
Thanks for previous help on Start two threads in same time it was
useful,but when I run this
two threads, I think they don't start at the same time
That's normal. Threading is an unpredictable concurrency pattern. Things
often don't happen the way one would want
Aaron Brady castiro...@gmail.com wrote:
On Jan 18, 9:52 am, David Pratt fairwinds...@gmail.com wrote:
Hi list. I use 'type' to generate classes but have a need to order
the attributes for the generated class. Of course a dict is not going
to maintain ordering. Is there any way to
Russ P. a écrit :
No one ever claimed that a programming language, no matter how
rigorous, can eliminate all bugs. All a language can do is to reduce
their rate of occurrence.
The Ariane fiasco was not a failure of Ada per se but rather a failure
of people using Ada.
Almost right.
They
vedrandeko...@yahoo.com schrieb:
Hello again,
Thanks for previous help on Start two threads in same time it was
useful,but when I run this
two threads, I think they don't start at the same time, here is my
code snippet:
import threading
class ThreadedClass1(threading.Thread):
def
Eric schrieb:
Coming from a perl background I'm new to the Python world. I need to
read a list of values, send each value to an external program and
capture and act on the output of that program. Reading and parsing the
initial values is not a problem but I can't seem to find anything on
the
Russ P. a écrit :
On Jan 17, 11:49 am, Bruno Desthuilliers
bdesth.quelquech...@free.quelquepart.fr wrote:
Please educate yourself and learn about why Ariane 5 crashed on it's
first flight, due to an error in a module written in ADA (which is such
a psychorigid language that C++ and Java are
Aaron Brady wrote in
news:6a10378f-addb-4d56-bc1b-0c382b3cb...@t26g2000prh.googlegroups.com
in comp.lang.python:
On Jan 18, 9:36 am, Paul Rubin http://phr...@nospam.invalid wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
def foo(self, x, y=None):
if y is None:
En Sun, 18 Jan 2009 13:54:06 -0200, John Fabiani jfabi...@yolo.com
escribió:
I have never worked with MySQL. I do work with others. The first part
looks fine. If you insert, update or delete then you need a 'commit' or
a 'rollback'. Preparing data for a report it is unlikely that you need
En Sun, 18 Jan 2009 13:54:06 -0200, John Fabiani jfabi...@yolo.com
escribió:
I have never worked with MySQL. I do work with others. The first part
looks fine. If you insert, update or delete then you need a 'commit' or
a 'rollback'. Preparing data for a report it is unlikely that you need
On Jan 18, 10:44 am, Rob Williscroft r...@freenet.co.uk wrote:
Aaron Brady wrote
innews:6a10378f-addb-4d56-bc1b-0c382b3cb...@t26g2000prh.googlegroups.com
in comp.lang.python:
On Jan 18, 9:36 am, Paul Rubin http://phr...@nospam.invalid wrote:
Steven D'Aprano
Steven D'Aprano wrote in news:018342f9$0$8693$c3e8...@news.astraweb.com
in comp.lang.python:
I'm not sure if this is a stupid question or not, but what's a
TextIOWrapper? In the example you give:
exec(open(fname))
the argument to exec -- open(fname) -- is a file object:
On Jan 18, 8:41 am, Eric ericc...@gmail.com wrote:
Coming from a perl background I'm new to the Python world. I need to
read a list of values, send each value to an external program and
capture and act on the output of that program. Reading and parsing the
initial values is not a problem but
Yes, I see your point. Not sure how that would happen. It is possible to
have multiple versions of python on the same machine I assume?
During the installation I have specified the directory to install python in,
otherwise I have not changed anything. Could it be an environment variable
or
Aaron Brady wrote in
news:582ef883-0176-4984-9521-6c1894636...@a26g2000prf.googlegroups.com
in comp.lang.python:
On Jan 18, 10:44 am, Rob Williscroft r...@freenet.co.uk wrote:
Aaron Brady wrote
innews:6a10378f-addb-4d56-bc1b-0c382b3cb...@t26g2000prh
.googlegroups.com
in comp.lang.python:
Ah yes, with your help I seem to have solved my own problem. I had
PYTHONPATH defined to point to the 2.5 directory.
Thanks!
Scott
On Sun, Jan 18, 2009 at 11:01 AM, Scott MacDonald
scott.p.macdon...@gmail.com wrote:
Yes, I see your point. Not sure how that would happen. It is possible to
waltbrad schrieb:
I want to upgrade from 2.5 to 2.6. Do I need to uninstall 2.5 before
I do that? If so, what's the best way to uninstall it? Thanks.
No, several versions of python can live happily together.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 14 Jan 2009 08:13:30 +, Steven D'Aprano wrote:
Absolutely. It's rather sad that I can do this:
import math
math.pi = 3.0
I like the ability to shoot myself in the foot, thank you very much, but
I should at least get a warning when I'm about to do so:
math.PI = 3.0 #
Steven D'Aprano a écrit :
On Sat, 17 Jan 2009 20:49:38 +0100, Bruno Desthuilliers wrote:
Russ P. a écrit :
(snip)
Why leave to
coding standards and company policy what can be encoded right into the
language?
Because human are smarter than computers.
That's an awfully naive statement.
Thanks guys. That helped point me int he right direction.
with your advice on the subprocess module I stumbled upon this
posting:
http://www.velocityreviews.com/forums/t359866-subprocess-module.html
for anyone else that might be interested here is the solution. It
simply calls a perl script
sentinel = object()
...
def foo(x, y=sentinel):
if y is sentinel:
y = self.a
it just struck me you could also do:
def foo(self, x, *y_args)
y = y_args[0] if y_args self.a
which more directly checks whether an argument was passed, but has the
I'm writing a WSGI application and I would like to check the content-
length header before reading the content to make sure that the content
is not too big in order to prevent denial-of-service attacks. So I do
something like this:
def application(environ, start_response):
status = 200 OK
Francesco Bochicchio wrote:
On Wed, 14 Jan 2009 08:13:30 +, Steven D'Aprano wrote:
Absolutely. It's rather sad that I can do this:
import math
math.pi = 3.0
I like the ability to shoot myself in the foot, thank you very much, but
I should at least get a warning when I'm about to do so:
On 18 sij, 17:48, Diez B. Roggisch de...@nospam.web.de wrote:
vedrandeko...@yahoo.com schrieb:
Hello again,
Thanks for previous help on Start two threads in same time it was
useful,but when I run this
two threads, I think they don't start at the same time, here is my
code snippet:
Ron Garret schrieb:
I'm writing a WSGI application and I would like to check the content-
length header before reading the content to make sure that the content
is not too big in order to prevent denial-of-service attacks. So I do
something like this:
def application(environ, start_response):
On Jan 18, 2009, at 8:01 PM, Ron Garret wrote:
def application(environ, start_response):
status = 200 OK
headers = [('Content-Type', 'text/html'), ]
start_response(status, headers)
if int(environ['CONTENT_LENGTH'])1000: return 'File too big'
How would that work for chunked
On Jan 18, 9:22 am, Bruno Desthuilliers
bdesth.quelquech...@free.quelquepart.fr wrote:
Properties by themselves are not the problem, quite on the contrary - as
you say, they actually help wrt/ encapsulation. What breaks
encapsulation is *automatic generation* for properties for *each and
any*
andrew cooke wrote:
Context - http://docs.python.org/3.0/reference/datamodel.html?highlight=data
model#object.__iadd__
Just a suggestion I thought I'd throw out... There's a restriction in
the language implementation on exactly what can go the left of an
augmented arithmetic expression.
For
On Jan 18, 11:29 am, Diez B. Roggisch de...@nospam.web.de wrote:
Ron Garret schrieb:
I'm writing a WSGI application and I would like to check the content-
length header before reading the content to make sure that the content
is not too big in order to prevent denial-of-service attacks.
vedrandeko...@yahoo.com wrote:
and thanks for all previous help.I want to measure memory usage of
executed python script.I'am working on windows XP.
Could you qualify measure? Do you mean:
a) debug (permanently high accuracy, potentially high runtime overhead)
b) monitor (high accuracy,
On Jan 18, 11:43 am, Petite Abeille petite.abei...@gmail.com wrote:
On Jan 18, 2009, at 8:01 PM, Ron Garret wrote:
def application(environ, start_response):
status = 200 OK
headers = [('Content-Type', 'text/html'), ]
start_response(status, headers)
if
Ron Garret schrieb:
On Jan 18, 11:29 am, Diez B. Roggisch de...@nospam.web.de wrote:
Ron Garret schrieb:
I'm writing a WSGI application and I would like to check the content-
length header before reading the content to make sure that the content
is not too big in order to prevent
as part of building python2.5.2 under msys under wine on linux using
mingw, i thought i'd try building _msi.pyd just for kicks. of course,
that required having an msi.lib import library, and associated header
files. so, purely as an experiment, i've documented the process by
which it is possible
On Jan 18, 12:40 pm, Diez B. Roggisch de...@nospam.web.de wrote:
Ron Garret schrieb:
On Jan 18, 11:29 am, Diez B. Roggisch de...@nospam.web.de wrote:
Ron Garret schrieb:
I'm writing a WSGI application and I would like to check the content-
length header before reading the content to
On Jan 19, 6:01 am, Ron Garret r...@flownet.com wrote:
I'm writing a WSGI application and I would like to check the content-
length header before reading the content to make sure that the content
is not too big in order to prevent denial-of-service attacks. So I do
something like this:
def
2009/1/18 Paul Rubin http://phr.cx@nospam.invalid:
I.e. the cast was wrong because of the failure of an unstated
assumption that a certain sensor reading was in a certain range.
Spark may still have allowed the cast only if the assumption was
stated explicitly in the specification.
Unless
On Jan 19, 6:43 am, Petite Abeille petite.abei...@gmail.com wrote:
On Jan 18, 2009, at 8:01 PM, Ron Garret wrote:
def application(environ, start_response):
status = 200 OK
headers = [('Content-Type', 'text/html'), ]
start_response(status, headers)
if
On Jan 18, 1:21 pm, Graham Dumpleton graham.dumple...@gmail.com
wrote:
On Jan 19, 6:01 am, Ron Garret r...@flownet.com wrote:
I'm writing a WSGI application and I would like to check the content-
length header before reading the content to make sure that the content
is not too big in order
I'm interested in Python and wanted to know if Python can manipulate
PE structure and bytes. Also what are its limits?
--
http://mail.python.org/mailman/listinfo/python-list
r:
Of course it would not run in C or Python but the point here is readability.
With languages like Genie you can go close:
http://live.gnome.org/Genie
Or better Delight (based on the D language), plus some my Python
compatibility libs (plus Pyd, if you want) you can run that code:
On Sun, 18 Jan 2009 07:36:53 -0800, Paul Rubin wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
def foo(self, x, y=None):
if y is None:
y = self.a
I don't find that clumsy in the least. I find it perfectly readable and
a standard idiom.
That has the same
alex23:
Paul, have you looked into Cython at all?
I can also suggest ShedSkin and the D language.
I have often used D for data munging, producing quick short
programs, when Python isn't fast enough for a certain purpose.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
Having said that, there are times where you need to pass None as a
legitimate argument and not as a sentinel.
I don't think it's worth trying to figure out which those times are.
The conclusion can be wrong, or can become wrong
Ron Garret schrieb:
On Jan 18, 12:40 pm, Diez B. Roggisch de...@nospam.web.de wrote:
Ron Garret schrieb:
On Jan 18, 11:29 am, Diez B. Roggisch de...@nospam.web.de wrote:
Ron Garret schrieb:
I'm writing a WSGI application and I would like to check the content-
length header before reading
1 - 100 of 205 matches
Mail list logo