Announcing python-blosc 1.0.3
A Python wrapper for the Blosc compression library
What is it?
===
Blosc (http://blosc.pytables.org) is a high performance compressor
optimized for
'tren' Version 1.239 is now released and available for download at:
http://www.tundraware.com/Software/tren
The last public release was 1.217.
-
What's New In This Release?
---
This release
Everyone,
I'm pleased to annouce the release of both a new production
and experimental release of GMPY. GMPY is a wrapper for
the MPIR or GMP multiple-precision arithmetic library.
The experimental release (GMPY2) now includes support for
the MPFR floating-point library.
GMPY is available for
On 11/18/2010 11:48 AM, tazz_ben wrote:
Hi Folks -
I'm an experienced programmer, but this is my first app with python,
so I apologize for any stupidity on my part. So I've written/still
working on a command line tool written in Python. It talks to a web
service, so there really isn't
On 11/18/2010 5:35 PM, Mark Wooding wrote:
John Naglena...@animats.com writes:
Python is defined by what a naive interpreter with late binding
and dynamic name lookups, like CPython, can easily implement. Simply
emulating the semantics of CPython with generated code doesn't help
all
In article 87fwvw214g@gmail.com,
Arnaud Delobelle arno...@gmail.com wrote:
Are you referring to the fact that in Python, if an attribute is a
property, the __dict__ lookup on the instance is not performed? As in:
class A:
... @property
... def x(self): return 42
...
a = A()
On 11/18/2010 7:57 PM, Martin Gregorie wrote:
[...]
.pyc files are an optional extra: in a *nix environment they are not
produced if you use a hash-bang line to execute the source file: they
only appear if you run the source with a python file.py command.
Close, but no cigar. They are only
On Thu, 18 Nov 2010 20:08:00 +0100, Stefan Sonnenberg-Carstens wrote:
If you need it really *precise*, cast your Fractions into type Decimal:
It's actually the opposite. Decimal has many advantages, but being
really precise is not one of them. It suffers the exact same issues re
precision and
On Fri, 19 Nov 2010 00:26:41 +, MRAB wrote:
On 19/11/2010 00:07, Steven D'Aprano wrote:
On Thu, 18 Nov 2010 14:21:47 +, Martin Gregorie wrote:
I use 'script' to refer to programs written in languages that don't
have a separate compile phase which must be run before the program can
On Sun, 14 Nov 2010, Paul Rubin wrote:
Jorge Biquez jbiq...@icsmx.com writes:
I was wondering if you can share what was the strategy you followed to
master Python (Yes I know I have to work hard study and practice a lot).
1. Read the tutorial http://docs.python.org/tutorial/
2. Start
Hi
I'm looking to find some help working with dpkt. As you probably know, there
really isn't any documentation, and not being astute at Python as of yet
leaves me with a lot of gaps.
Is there anyone here that can point me in a direction toward writing some
test code for parsing gre packets?
Am 19.11.2010 06:39, schrieb Verde Denim:
Hi
I'm looking to find some help working with dpkt. As you probably know,
there really isn't any documentation, and not being astute at Python
as of yet leaves me with a lot of gaps.
Is there anyone here that can point me in a direction toward writing
dutche dut...@gmail.com wrote:
Hi folks, I have a unusual question here.
How can I change the value of EAX register under python under Linux??
As paimei does under Windows.
My project is to have a python program that loads a C program and sets
a breakpoint at some address, and then with this
On Nov 12, 10:52 pm, John O'Hagan resea...@johnohagan.com wrote:
On Sat, 13 Nov 2010, Steven D'Aprano wrote:
On Fri, 12 Nov 2010 09:47:26 +, John O'Hagan wrote:
I have a generator function which takes as arguments another generator
and a dictionary of other generators like this:
On Wed, Nov 17, 2010 at 11:54 PM, neocortex pmi...@gmail.com wrote:
Hello All,
Can anyone help me with the Pygoogle:
from pygoogle import pygoogle
You're apparently talking about http://code.google.com/p/pygoogle/
rather than http://pygoogle.sourceforge.net/ ; the former appears to
have
Le 17/11/2010 18:52, geremy condra a écrit :
On Wed, Nov 17, 2010 at 6:44 AM, Romaric DEFAUXr...@audaxis.com wrote:
Le 16/11/2010 17:47, Romaric DEFAUX a écrit :
Hi everybody !
First time I write to this mailing list :)
I started writing in python last week, that's probably why I
Hi,
you can use json for passing list and dict .
Pickle is dangerous .
Instead of pickle.loads/pickle.dumps use json.loads and json.dumps
(using stdlib json in python = 2.6 or simplejson in python 2.6)
Regards
Le Thu, 18 Nov 2010 09:29:00 +0100,
Romaric DEFAUX r...@audaxis.com a écrit :
thank you Martin. You are right.
But the elapsed time is also okay for me. And i would like to assume
that the total CPU time equals to the number of CPUs multiply the
elapsed time. As to the number you mentioned, it is the 'process id',
so it will be no problem to identify each job.
Huiksy
On
the number before @ is the process id in the linux server and it is
identical.
So i do NOT think distinguish each job's starting and ending time is
difficult in this case.
Huisky
On Nov 17, 11:38 pm, Tim Harig user...@ilthio.net wrote:
On 2010-11-17, huisky hui...@gmail.com wrote:
I want to
Thank you very much for your reply.
I think you just count the total number of NCPU used for each user.
And it does NOT show how much time used for each user.
Huisky
On Nov 18, 12:10 am, Steve Holden st...@holdenweb.com wrote:
On 11/17/2010 4:45 PM, huisky wrote: Say I have following log file,
Thanks for the tip, I'll do that :)
Le 18/11/2010 09:43, Michael Ricordeau a écrit :
Hi,
you can use json for passing list and dict .
Pickle is dangerous .
Instead of pickle.loads/pickle.dumps use json.loads and json.dumps
(using stdlib json in python= 2.6 or simplejson in python 2.6)
Hello,
I was searching online to find more info about JavaFit and I came across your
information.
Can you tell me, are you still involved with JavaFit? If you are, how are
things going for you?
Please let me know.
Sincerely,
Bill
--
http://mail.python.org/mailman/listinfo/python-list
Sorin Schwimmer wrote:
I have to eliminate diacritics in a fairly large file.
Inspired by http://code.activestate.com/recipes/81330/, I came up with the
following code:
Here's the unicode.translate()-based approach spelt out:
http://effbot.org/zone/unicode-convert.htm
Peter
--
Steven D'Aprano steve-remove-t...@cybersource.com.au writes:
On Wed, 17 Nov 2010 16:31:40 +, Mark Wooding wrote:
But I don't think that's the big problem with this proposal. The real
problem is that it completely changes the evaluation rule for the
conditional expression. (The
We are a technical discussion maillinglist. About a computer
programming language. Named Python.
An unrelated computer programming language which happens to be named
Java also exists, but is not this mailinglist's topic of discussion.
Some computer programmers personally consume a lot of coffee,
Hi again,
I try simplejson, but I have a problem. (I just replace pickle
everywhere by simplejson)
Here's a test I did :
# python
Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type help, copyright, credits or license for more information.
When loading from json datas with simplejson, strings are unicode .
Le Thu, 18 Nov 2010 11:22:30 +0100,
Romaric DEFAUX r...@audaxis.com a écrit :
Hi again,
I try simplejson, but I have a problem. (I just replace pickle
everywhere by simplejson)
Here's a test I did :
# python
Python
Roger Davis wrote:
Completely off topic but I think the try clause could be rewritten that way:
...
Don't use bare except clause, you're masking syntax errors for instance,
which will be flagged as 'unexpected error in generation
In a more general manner, if something unexpected happens
Tim Harig wrote:
On 2010-11-18, noydb noyd...@gmail.com wrote:
I have an executable that I want to run within python code. The exe
requires an input text file, the user to click a 'compute' button, and
then the exe calculates several output values, one of which I want to
capture into a
Sorry for this stupid question, but how can I convert unicode to string.
I ask that because I hit an error (perhaps a bug) in mod_wsgi, and that
crash the apache process :
TypeError: sequence of string values expected, value of type unicode found
RuntimeError: generator ignored GeneratorExit
Hi answer to myself :)
With str(unicode_string) !
Le 18/11/2010 12:23, Romaric DEFAUX a écrit :
Sorry for this stupid question, but how can I convert unicode to string.
I ask that because I hit an error (perhaps a bug) in mod_wsgi, and
that crash the apache process :
TypeError: sequence of
The library doesn't seem to have built-in support for filtering by
language (and Google lacks a search query-string-based operator for
that), but it looks like you could implement that feature by adding an
lr parameter with an appropriate value to the query `args`
dictionary. See the lr?
On 18/11/2010 04:30, Benjamin Kaplan wrote:
On Wed, Nov 17, 2010 at 11:21 PM, Sorin Schwimmersx...@yahoo.com wrote:
Hi All,
I have to eliminate diacritics in a fairly large file.
Inspired by http://code.activestate.com/recipes/81330/, I came up with the
following code:
#! /usr/bin/env
Hi!
Would it be possible to use a with statement with an HTTPConnection object?
I know it is not possible at this moment, it doesn't implement an
__exit__ method, at least in version 3.1.1. I was wondering if the
__exit__ method should do something more than conn.close(), something
really hard
On Thu, Nov 18, 2010 at 3:46 AM, trylks try...@gmail.com wrote:
Hi!
Would it be possible to use a with statement with an HTTPConnection object?
Yes, via http://docs.python.org/library/contextlib.html#contextlib.closing
from httplib import HTTPConnection
from contextlib import closing
with
Hello.
I have a DLL that allocates memory and returns it. Function in DLL is like this:
void Foo( unsigned char** ppMem, int* pSize )
{
* pSize = 4;
* ppMem = malloc( * pSize );
for( int i = 0; i * pSize; i ++ ) (* pMem)[ i ] = i;
}
Also, i have a python code that access this function
On Nov 17, 10:04 am, MATLABdude matlab.d...@mbnet.fi wrote:
Thanks guys!
I still have some problems. I made the code somewhat simpler by
dropping off some parts of it (xx, f).
Now my Python code calculates 8 different values for lambda. The
problem is that I don't know where the minus sign
John Nagle na...@animats.com wrote in message
news:4ce37e01$0$1666$742ec...@news.sonic.net...
On 11/16/2010 10:24 PM, swapnil wrote:
AFAIK, the merging plan was approved by Guido early this year. I guess
Google is expecting the community to drive the project from here on.
That was the whole
On 2010-11-16 14:35:01 -0500, Neal Becker said:
I want to have subparsers, but I also want to be able to say:
myprogram --version
and get the version #
Would it not be possible to print the version number and then exit the
program before building the subparser?
On 18/11/2010 12:16, MATLABdude wrote:
On Nov 17, 10:04 am, MATLABdudematlab.d...@mbnet.fi wrote:
Thanks guys!
I still have some problems. I made the code somewhat simpler by
dropping off some parts of it (xx, f).
Now my Python code calculates 8 different values for lambda. The
problem is
On Thu, 2010-11-18 at 11:22 +0100, Romaric DEFAUX wrote:
Hi again,
I try simplejson, but I have a problem. (I just replace pickle
everywhere by simplejson)
Explanation :
I dumps with json a list of dictionnaries into disk_list_json.
When I loads it, I don't get my list of dictionnaries
In article mailman.1048.1289936253.2218.python-l...@python.org,
Steve Holden st...@holdenweb.com wrote:
On 11/16/2010 2:22 PM, Lou Pecora wrote:
I'll jump in and recommend the book Python in a Nutshell by Martelli.
It may be a little dated now, but it covers many Python topics in good
On 2:59 PM, Sorin Schwimmer wrote:
Steven D'Aprano: the original file is 139MB (that's the typical size for it).
Eliminating diacritics is just a little toping on the cake; the processing is
something else.
Thanks anyway for your suggestion,
SxN
PS Perhaps I should have mention that I'm on
On Thu, 18 Nov 2010 01:16:34 +, MRAB wrote:
I'd probably say that a script is a program which is normally not
interactive: you just set it up, start it, and let it do its work (a
batch script, for example). It's also written in a language primarily
designed for convenience rather than
+2 I also agree.
- Braden Faulkner
-Original Message-
From: Lou Pecora pec...@anvil.nrl.navy.mil
Sender: python-list-bounces+brf256=gmail@python.org
Date: Thu, 18 Nov 2010 09:05:59
To: python-list@python.org
Subject: Re: What was your strategy?
In article
Hello All,
First off I must say that Twisted is a very nice event driven I/O
package indeed. Thanks to all the developers who have contributed to
it, as it's made my life much easier.
Now for my question...
I have a custom server application, and I have it structured as such:
MyServerApp/ --
On Thu, 18 Nov 2010 12:46:07 +0100
trylks try...@gmail.com wrote:
Hi!
Would it be possible to use a with statement with an HTTPConnection object?
I know it is not possible at this moment, it doesn't implement an
__exit__ method, at least in version 3.1.1. I was wondering if the
__exit__
Hi JM,
Thank you very much for your followup explanation!
Roger
--
http://mail.python.org/mailman/listinfo/python-list
On 2010-11-18, Martin Gregorie mar...@address-in-sig.invalid wrote:
On Thu, 18 Nov 2010 01:16:34 +, MRAB wrote:
I'd probably say that a script is a program which is normally not
interactive: you just set it up, start it, and let it do its work (a
batch script, for example). It's also
Antoine Pitrou solip...@pitrou.net writes:
On Thu, 18 Nov 2010 12:46:07 +0100
trylks try...@gmail.com wrote:
Hi!
Would it be possible to use a with statement with an HTTPConnection object?
I know it is not possible at this moment, it doesn't implement an
__exit__ method, at least in
On Thu, 18 Nov 2010 15:41:51 +, Grant Edwards wrote:
On 2010-11-18, Martin Gregorie mar...@address-in-sig.invalid wrote:
On Thu, 18 Nov 2010 01:16:34 +, MRAB wrote:
I'd probably say that a script is a program which is normally not
interactive: you just set it up, start it, and let it
I do a recursive evaluation of an expression involving fractions and
unsurprisingly the numerator and denominator grows pretty quickly.
After 10-20 iterations the number of digits in the numerator and
denominator (as integers) reaches 80-100. And I'm wondering until what
point I can trust the
Hi Folks -
I'm an experienced programmer, but this is my first app with python,
so I apologize for any stupidity on my part. So I've written/still
working on a command line tool written in Python. It talks to a web
service, so there really isn't anything in it that is dependent on a
particular
On Nov 18, 9:58 am, Bryan Richardson btri...@gmail.com wrote:
Hello All,
First off I must say that Twisted is a very nice event driven I/O
package indeed. Thanks to all the developers who have contributed to
it, as it's made my life much easier.
Now for my question...
I have a custom
On Thu, Nov 18, 2010 at 9:27 AM, Daniel Fetchinson
fetchin...@googlemail.com wrote:
I do a recursive evaluation of an expression involving fractions and
unsurprisingly the numerator and denominator grows pretty quickly.
After 10-20 iterations the number of digits in the numerator and
Everyone,
I'm pleased to annouce the release of both a new production
and experimental release of GMPY. GMPY is a wrapper for
the MPIR or GMP multiple-precision arithmetic library.
The experimental release (GMPY2) now includes support for
the MPFR floating-point library.
GMPY is available for
On Thu, Nov 18, 2010 at 4:24 AM, BartC b...@freeuk.com wrote:
John Nagle na...@animats.com wrote in message
news:4ce37e01$0$1666$742ec...@news.sonic.net...
On 11/16/2010 10:24 PM, swapnil wrote:
AFAIK, the merging plan was approved by Guido early this year. I guess
Google is expecting
Thanks for the confirmation Martin!
Do you think, it the mentioned omission of the character names of some
CJK ranges in unicodedata intended, or should it be reported to the
tracker?
It's certainly a bug. So a bug report would be appreciated, but much
more so a patch. Ideally, the patch
I do hope that it isn't dead but it unfortunately seems that way?
- Braden Faulkner
--
http://mail.python.org/mailman/listinfo/python-list
Lou Pecora pec...@anvil.nrl.navy.mil writes:
I'll jump in and recommend the book Python in a Nutshell by Martelli.
It's encyclopedic.
Indeed. I hope Martelli updates it. I'd buy another copy right away.
It's a great book but not a starting point for beginners. It's
definitely worth
I do a recursive evaluation of an expression involving fractions and
unsurprisingly the numerator and denominator grows pretty quickly.
After 10-20 iterations the number of digits in the numerator and
denominator (as integers) reaches 80-100. And I'm wondering until what
point I can trust the
On 11/18/2010 4:24 AM, BartC wrote:
John Nagle na...@animats.com wrote in message
news:4ce37e01$0$1666$742ec...@news.sonic.net...
On 11/16/2010 10:24 PM, swapnil wrote:
AFAIK, the merging plan was approved by Guido early this year. I
guess Google is expecting the community to drive the
Am 18.11.2010 17:27, schrieb Daniel Fetchinson:
I do a recursive evaluation of an expression involving fractions and
unsurprisingly the numerator and denominator grows pretty quickly.
After 10-20 iterations the number of digits in the numerator and
denominator (as integers) reaches 80-100. And
On 18/11/2010 17:50, brf...@gmail.com wrote:
I do hope that it isn't dead but it unfortunately seems that way?
- Braden Faulkner
It looks like we'll have to get used to a laden one.
Maybe if we had two, and a strand of creeper...
--
http://mail.python.org/mailman/listinfo/python-list
On 18/11/2010 10:05, Chris Rebert wrote:
We are a technical discussion maillinglist. About a computer
programming language. Named Python.
An unrelated computer programming language which happens to be named
Java also exists, but is not this mailinglist's topic of discussion.
Some computer
Am 18.11.2010 20:17, schrieb Ben James:
On 18/11/2010 10:05, Chris Rebert wrote:
We are a technical discussion maillinglist. About a computer
programming language. Named Python.
An unrelated computer programming language which happens to be named
Java also exists, but is not this mailinglist's
I will use 2.5.
I tried your suggestion, with this code
import subprocess
pig = subprocess.Popen([C:\Halls\hallbig2.exe],
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
result = pig.communicate(input='C:\Halls\Input\Ea39j.txt')[-1] #I need
to capture the, what I think is the, last output
print
Hi folks, I have a unusual question here.
How can I change the value of EAX register under python under Linux??
As paimei does under Windows.
My project is to have a python program that loads a C program and sets
a breakpoint at some address, and then with this breakpoint I change
the EAX
Thanks Jean-Paul, I added the following to my server.py file and
things work perfectly on both Windows and Linux now.
sys.path.insert(0, os.getcwd())
On Thu, Nov 18, 2010 at 9:52 AM, Jean-Paul Calderone
calderone.jeanp...@gmail.com wrote:
On Nov 18, 9:58 am, Bryan Richardson btri...@gmail.com
On 11/18/2010 11:27 AM, Daniel Fetchinson wrote:
I do a recursive evaluation of an expression involving fractions and
unsurprisingly the numerator and denominator grows pretty quickly.
After 10-20 iterations the number of digits in the numerator and
denominator (as integers) reaches 80-100. And
On Wed, 2010-11-17 at 21:12 -0800, Sorin Schwimmer wrote:
Thanks for your answers.
Benjamin Kaplan: of course dict is a type... silly me! I'll blame it on the
time (it's midnight here).
Chris Rebert: I'll have a look.
Thank you both,
SxN
Forgive me if this is off the track. I
Am 18.11.2010 21:20, schrieb dutche:
Hi folks, I have a unusual question here.
How can I change the value of EAX register under python under Linux??
As paimei does under Windows.
My project is to have a python program that loads a C program and sets
a breakpoint at some address, and then with
On 2010-11-18, noydb jenn.du...@gmail.com wrote:
import subprocess
pig = subprocess.Popen([C:\Halls\hallbig2.exe],
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
result = pig.communicate(input='C:\Halls\Input\Ea39j.txt')[-1] #I need
to capture the, what I think is the, last output
From the
I'm baffled by the behavior of pdb as I attempt to debug a Twill test.
I'm trying to step through socket.get_fqdn() and my key entries are garbled.
I prefer to use ipdb, but the STDOUT gets messed up and printed at the end
of the ipdb session. That defeats the purpose of a debugger.
So I'm using
Here's -a- way to try - not necessarily the best way:
1) Write a little gcc .c with inline assembler, to make your EAX change
2) Call it from CPython using ctypes
However, by the time you return from the code that makes your change and
resume execution in the CPython interpreter, EAX may well
On 2010-11-18, Jean-Michel Pichavant jeanmic...@sequans.com wrote:
Tim Harig wrote:
If you are not already, I would highly suggest using Python3 with the
subprocess module:
Suggesting subprocess is a good idea, *highly*
On Nov 18, 5:22 pm, Tim Harig user...@ilthio.net wrote:
On 2010-11-18, noydb jenn.du...@gmail.com wrote:
import subprocess
pig = subprocess.Popen([C:\Halls\hallbig2.exe],
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
result = pig.communicate(input='C:\Halls\Input\Ea39j.txt')[-1] #I need
On Nov 18, 1:31 pm, John Nagle na...@animats.com wrote:
On 11/18/2010 4:24 AM, BartC wrote:
John Nagle na...@animats.com wrote in message
news:4ce37e01$0$1666$742ec...@news.sonic.net...
On 11/16/2010 10:24 PM, swapnil wrote:
AFAIK, the merging plan was approved by Guido early
Hello,
I am trying to create an extension on Windows and I may be over my
head but I have made it pretty far.
I am trying to create bindings for some libraries which require me to
use Visual Studio 2005.
I set up the spammodule example and in VS set the output file to be a .pyd file.
When I
On 2010-11-18, noydb noyd...@gmail.com wrote:
On Nov 18, 5:22 pm, Tim Harig user...@ilthio.net wrote:
On 2010-11-18, noydb jenn.du...@gmail.com wrote:
Okay, I see now. I did run it to start with 0 -- still same result no
matter if 0 or -1.
So, what is result (stdout, using [0]) in this case?
On Nov 18, 5:54 pm, noydb noyd...@gmail.com wrote:
On Nov 18, 5:22 pm, Tim Harig user...@ilthio.net wrote:
On 2010-11-18, noydb jenn.du...@gmail.com wrote:
import subprocess
pig = subprocess.Popen([C:\Halls\hallbig2.exe],
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
result =
On Nov 18, 6:20 pm, noydb noyd...@gmail.com wrote:
On Nov 18, 5:54 pm, noydb noyd...@gmail.com wrote:
On Nov 18, 5:22 pm, Tim Harig user...@ilthio.net wrote:
On 2010-11-18, noydb jenn.du...@gmail.com wrote:
import subprocess
pig = subprocess.Popen([C:\Halls\hallbig2.exe],
On Thu, 18 Nov 2010 14:21:47 +, Martin Gregorie wrote:
I use 'script' to refer to programs written in languages that don't have
a separate compile phase which must be run before the program can be
executed. IOW Python and Perl programs are scripts aloing with programs
written as awk,
On Thu, 18 Nov 2010 09:32:23 +, Mark Wooding wrote:
[...]
You're wrong. Python evaluates these left-to-right, as I said.
Parentheses override operator associativity; they don't affect
evaluation order at all.
Fair enough. I concede your point.
[...]
Not everything needs to be a one
On 19/11/2010 00:07, Steven D'Aprano wrote:
On Thu, 18 Nov 2010 14:21:47 +, Martin Gregorie wrote:
I use 'script' to refer to programs written in languages that don't have
a separate compile phase which must be run before the program can be
executed. IOW Python and Perl programs are
On 19.11.2010 01:26, MRAB wrote:
On 19/11/2010 00:07, Steven D'Aprano wrote:
On Thu, 18 Nov 2010 14:21:47 +, Martin Gregorie wrote:
I use 'script' to refer to programs written in languages that don't have
a separate compile phase which must be run before the program can be
executed. IOW
On Fri, 19 Nov 2010 00:07:05 +, Steven D'Aprano wrote:
On Thu, 18 Nov 2010 14:21:47 +, Martin Gregorie wrote:
I use 'script' to refer to programs written in languages that don't
have a separate compile phase which must be run before the program can
be executed. IOW Python and Perl
Python Users,
I am an average Fortran user.
I am new to python and I am currently evaluating options and functionalities of
numerical programming and related 2d and 3d graphic outputs with python.
Kindly share your experience in scientific programming with python like how do
you like it,
Pythonistas:
If everyone likes this post, then the code is a snippet for
community edification. Otherwise, it's a question: How to do this kind
of thing better?
I want a dict() variant that passes these test cases:
map = Map()
assert not(map.has_key('_default'))
map =
John Nagle na...@animats.com writes:
Python is defined by what a naive interpreter with late binding
and dynamic name lookups, like CPython, can easily implement. Simply
emulating the semantics of CPython with generated code doesn't help
all that much.
Indeed.
Because you can
You may want to look at the collections.defaultdict class. It takes in a
factory function for default values.
You can also implement your class by overriding the __missing__ method of
the dict class, rather than overriding the __getitem__.
Both were added in Python 2.5 according to the
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
Not everything needs to be a one liner. If you need this, do it the
old- fashioned way:
t = foo()
if not pred(t): t = default_value
I already explained how to write it as a one-liner:
t = (lambda y: y if
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
On Thu, 18 Nov 2010 14:21:47 +, Martin Gregorie wrote:
I use 'script' to refer to programs written in languages that don't have
a separate compile phase which must be run before the program can be
executed. IOW Python and
On Nov 18, 2:59 pm, Jean-Paul Calderone calderone.jeanp...@gmail.com
wrote:
On Nov 18, 1:31 pm, John Nagle na...@animats.com wrote:
On 11/18/2010 4:24 AM, BartC wrote:
John Nagle na...@animats.com wrote in message
news:4ce37e01$0$1666$742ec...@news.sonic.net...
On 11/16/2010 10:24
On 11/18/2010 9:05 PM, Mark Wooding wrote:
Maybe, once upon a time, there was a meaningful distinction to be made
between purely interpreted languages and purely compiled languages.
No, there never was; only between interpreting and compiling
implementations.
Right. I remember using a C
Brian Quinlan br...@sweetapp.com added the comment:
Would you include the entire output of the test run?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10183
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Looks like a reasonable proposal, but coding this in C is a chore.
It's not that bad. Most C code is a bit of a chore compared to Python but it
really doesn't take much to write a C equivalent of: functools.partial(%r,
Antoine Pitrou pit...@free.fr added the comment:
Y:\py3k\__svn__\PCbuild\amd64\python_d.exe -m test.regrtest -v
test_concurrent_futures
== CPython 3.2a4+ (py3k, Nov 18 2010, 11:12:09) [MSC v.1500 64 bit (AMD64)]
== Windows-7-6.1.7600 little-endian
== Y:\py3k\__svn__\build\test_python_2016
Valery Khamenya khame...@gmail.com added the comment:
Guys, do you expect anythig else from me in respect to this issue? Let me know
it before my non-stopable garbage collector wipes all the details from my brain
away :)
--
___
Python tracker
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +facundobatista, georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10351
___
___
1 - 100 of 167 matches
Mail list logo