Chris Rebert於 2012年10月24日星期三UTC+8下午2時07分29秒寫道:
On Tue, Oct 23, 2012 at 10:23 PM, seektime michael.j.kra...@gmail.com wrote:
Here's some example code. The input is a list which is a matrix of
letters:
a b a
b b a
and I'd like to turn this into a Python array:
On Friday, October 19, 2012 4:40:42 PM UTC+8, inshu chauhan wrote:
in this prog I have written a code to calculate teh centre of a given 3D
data..
but i want to calculate it for every 3 points not the whole data, but
instead of giving me centre for every 3 data the prog is printing
Ashish Jain於 2012年10月18日星期四UTC+8下午5時27分04秒寫道:
Hi,
I have a html string in an object, when I do repr() of that object, I get
value as:
{'Id' : 1, 'Body': u'p Hello /p'}
I don't wish to have 'u' as the character in my string representation. As
this is not a valid json
Dave Angel於 2012年10月17日星期三UTC+8下午10時37分01秒寫道:
On 10/17/2012 10:06 AM, rusi wrote:
On Oct 17, 5:33 pm, Dave Angel d...@davea.name wrote:
On 10/17/2012 12:43 AM, Kevin Anthony wrote: Is it not true that list
comprehension is much faster the the for loops?
If it is not the correct
rusi於 2012年10月17日星期三UTC+8下午10時50分11秒寫道:
On Oct 17, 7:37 pm, Dave Angel d...@davea.name wrote:
And I'd wager all the improvement is in the inner loop, the dot() function.
Sorry -- red herring!
Changing
def mm1(a,b): return [[sum(x*y for x,y in zip(ra,rb)) for rb in
Pradipto Banerjee於 2012年10月16日星期二UTC+8下午9時59分05秒寫道:
I am trying to define class, where if I use a statement a = b, then instead
of a pointing to the same instance as b, it should point to a copy of
b, but I can't get it right.
Currently, I have the following:
class
Wanderer於 2012年10月12日星期五UTC+8下午11時36分27秒寫道:
I'm trying to write some code that will load one of three dll depending on
the one available. I've tried the code below, but it doesn't work. The try
except doesn't catch the exception. Is there a way to do this?
try:
D.M. Procida於 2012年10月9日星期二UTC+8下午9時24分30秒寫道:
What exactly is the point of a private method? Why or when would I want
Private methods in the object level are searched first
in the run time of python interpreter.
I did turn some private methods in to c programs from time to time.
--
Skip Montanaro於 2012年10月6日星期六UTC+8上午8時25分06秒寫道:
I haven't messed around with Python 3 recently, so decided to give it
a whirl again. I cloned the trunk (cpython) and set about it. This
is on an OpenSUSE 12.1 system. I configured like so:
./configure
Prasad, Ramit於 2012年10月6日星期六UTC+8上午4時06分31秒寫道:
Steven D'Aprano wrote:
Sent: Thursday, October 04, 2012 7:22 PM
To: python-list@python.org
Subject: Re: notmm is dead!
On Thu, 04 Oct 2012 14:10:46 -0400, Etienne Robillard wrote:
Dear list,
Due to lack of
palmeira於 2012年10月6日星期六UTC+8上午11時27分47秒寫道:
Dear pythonists,
I'm having a problem with read/write binary in python.
I have a binary file that I need to read information, extract a array,
modify this array and put these values into file again in same binary
format.
I need to use
to properly implement
force_unique_combinations, but it runs. I hope this is right. If you need
significantly more speed your best chance is probably Cython or C, although
I don't doubt 10x more speed may well be possible from within Python.
Also, 8 Dihedral is a bot
Oscar Benjamin於 2012年10月4日星期四UTC+8上午4時29分51秒寫道:
Oscar wrote:
def uniquecombinations(h, m):
for ha in submultisets(h, len(h)//2):
hb = list(h)
for c in ha:
hb.remove(c)
yield [m[0] + a for a in ha] + [m[1] + b for b in hb]
h =
On Monday, October 1, 2012 4:17:50 PM UTC+8, Mark Lawrence wrote:
On 01/10/2012 01:58, 8 Dihedral wrote:
Your question seems vague to me. If you know you are storing
only immutable tuples in a list, then the way to iterate is simple.
Does Python have a magic method
Steven D'Aprano於 2012年10月3日星期三UTC+8上午8時57分20秒寫道:
On Wed, 03 Oct 2012 03:58:02 +1000, Chris Angelico wrote:
Dihedral might be a bot and might not. I've come to the conclusion that
it's not worth trying to find out, given that a good bot can outdo a lot
of humans in useful
Steven D'Aprano於 2012年10月3日星期三UTC+8上午9時24分13秒寫道:
On Tue, 02 Oct 2012 18:11:20 -0700, 8 Dihedral wrote:
Steven D'Aprano於 2012年10月3日星期三UTC+8上午8時57分20秒寫道:
Oh, I'm convinced that it's a bot.
The fact that Dihedral never responds to conversations about him/it is
a give away
On Monday, October 1, 2012 10:42:02 PM UTC+8, Chris Angelico wrote:
On Tue, Oct 2, 2012 at 12:37 AM, Jason Friedman ja...@powerpull.net wrote:
Is there a reason to use that format, rather than using Python
notation? I've at times made config files that simply get imported.
Instead of
On Sunday, September 30, 2012 12:15:57 AM UTC+8, Thomas Bach wrote:
Hi,
say we have the following:
data = [('foo', 1), ('foo', 2), ('bar', 3), ('bar', 2)]
is there a way to code a function iter_in_blocks such that
result = [ list(block) for block in
On Saturday, September 29, 2012 9:46:22 PM UTC+8, Ramchandra Apte wrote:
On Thursday, 27 September 2012 04:14:42 UTC+5:30, Tim Chase wrote:
On 09/26/12 17:28, 8 Dihedral wrote:
8 Dihedral於 2012年9月27日星期四UTC+8上午6時07分35秒寫道:
In these conditions, how to make this list
On Sunday, September 30, 2012 1:19:22 AM UTC+8, Ian wrote:
On Sat, Sep 29, 2012 at 11:01 AM, 8 Dihedral
dihedral88...@googlemail.com wrote:
Don't you get it why I avoided the lambda one liner as a functon.
I prefer the def way with a name chosen.
Certainly
Jayden於 2012年9月28日星期五UTC+8下午7時57分14秒寫道:
Dear All,
I have a concern in developing commercial code with Python. Someone told me
that its program can be easily hacked to get its source code. Is it really
the case? Any way to protect your source code?
Thanks a lot!
Jayden
dave於 2012年9月29日星期六UTC+8上午7時51分10秒寫道:
more clearer, this is a more realistic use case:
['awefawef', 'awefawfsf', 'awefsdf', 'zz', 'zz',
'zz']
and the quantity of ''zz'' would be dynamic.
On Friday, September 28, 2012 4:46:15
Wayne Werner於 2012年9月27日星期四UTC+8上午12時05分31秒寫道:
On Fri, 21 Sep 2012, Dennis Lee Bieber wrote:
On Fri, 21 Sep 2012 14:26:04 +0530, Mayuresh Kathe mayur...@kathe.in
declaimed the following in gmane.comp.python.general:
Is there a good book on foundational as well as advanced
Tim Chase於 2012年9月27日星期四UTC+8上午6時44分42秒寫道:
On 09/26/12 17:28, 8 Dihedral wrote:
8 Dihedral於 2012年9月27日星期四UTC+8上午6時07分35秒寫道:
In these conditions, how to make this list [[0,0,0],[0,0,0]] with *
without this behavior?
a = [[0]*3 for i in xrange(2)]
a[0][0]=2
TP於 2012年9月27日星期四UTC+8上午5時25分04秒寫道:
Hi everybody,
I have tried, naively, to do the following, so as to make lists quickly:
a=[0]*2
a
[0, 0]
a[0]=3
a
[3, 0]
All is working fine, so I extended the technique to do:
a=[[0]*3]*2
a
[[0, 0, 0], [0,
Paul Rubin於 2012年9月27日星期四UTC+8上午5時43分58秒寫道:
TP t...@frenoespam.fr.invalid writes:
copies a list, he copies in fact the *pointer* to the list
Is it the correct explanation?
Yes, that is correct.
In these conditions, how to make this list [[0,0,0],[0,0,0]] with *
8 Dihedral於 2012年9月27日星期四UTC+8上午6時07分35秒寫道:
Paul Rubin於 2012年9月27日星期四UTC+8上午5時43分58秒寫道:
TP t...@frenoespam.fr.invalid writes:
copies a list, he copies in fact the *pointer* to the list
Is it the correct explanation?
Yes, that is correct
Tim Chase於 2012年9月27日星期四UTC+8上午6時44分42秒寫道:
On 09/26/12 17:28, 8 Dihedral wrote:
8 Dihedral於 2012年9月27日星期四UTC+8上午6時07分35秒寫道:
In these conditions, how to make this list [[0,0,0],[0,0,0]] with *
without this behavior?
a = [[0]*3 for i in xrange(2)]
a[0][0]=2
DPalao於 2012年9月25日星期二UTC+8下午11時13分54秒寫道:
On Jueves septiembre 20 2012 11:12:44 Rolando Cañer Roblejo escribió:
Hi all,
Is it possible for me to put a limit in the amount of processor usage (%
CPU) that my current python script is using? Is there any module useful
for this
Grant Edwards於 2012年9月26日星期三UTC+8上午2時25分31秒寫道:
On 2012-09-25, Martin P. Hellwig martin.hell...@gmail.com wrote:
On Tuesday, 25 September 2012 09:14:27 UTC+1, Mark Lawrence wrote:
Hi all,
I though this might be of interest.
xliiv於 2012年9月21日星期五UTC+8下午9時13分38秒寫道:
On Friday, September 21, 2012 3:04:02 PM UTC+2, Tarek Ziadé wrote:
On 9/21/12 2:14 PM, xliiv wrote:
Python Paste is probably what you are looking for - see
http://lucasmanual.com/mywiki/PythonPaste for example
Duncan Booth於 2012年9月25日星期二UTC+8上午1時33分31秒寫道:
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
On Mon, 24 Sep 2012 00:14:23 +0100, Mark Lawrence wrote:
Purely for fun I've been porting some code to Python and came across
the singletonMap[1]. I'm aware that there
Chris Angelico於 2012年9月22日星期六UTC+8下午10時10分12秒寫道:
On Sat, Sep 22, 2012 at 11:07 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
As per their partnership agreement, IBM took over development of OS/2
version 2 while Microsoft worked on developing version 3. OS/2 2.0 was
giuseppe...@gmail.com於 2012年9月24日星期一UTC+8上午1時44分30秒寫道:
Hi
Have two dict() of the same length and i want print them to a common file.
a={1: 1, 2: 2, 3: 3}
b={1: 11, 2: 22, 3: 33}
in order to obtain
1 1 1 11
2 2 2 22
3 3 3 33
I tried
output =
Ian於 2012年9月22日星期六UTC+8下午2時23分43秒寫道:
On Fri, Sep 21, 2012 at 7:25 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Fri, 21 Sep 2012 14:49:55 -0600, Ian Kelly wrote:
On Fri, Sep 21, 2012 at 1:54 PM, 8 Dihedral
dihedral88...@googlemail.com wrote:
I don't
Dave Angel於 2012年9月22日星期六UTC+8下午7時44分54秒寫道:
On 09/22/2012 06:53 AM, Alister wrote:
On Fri, 21 Sep 2012 18:47:57 -0400, Dave Angel wrote:
SNIP
That's not true at all. You'd re thinking of Windows 3, Windows 95, 98,
and ME, which were hacked on top of MSDOS. But Windows
Ulrich Eckhardt於 2012年9月21日星期五UTC+8下午5時15分03秒寫道:
Am 21.09.2012 00:58, schrieb thorso...@lavabit.com:
list = [{'1': []}, {'2': []}, {'3': ['4', '5']}]
I want to check for a value (e.g. '4'), and get the key of the dictionary
that contains that value.
Note:
1. list is a
Makoto Kuwata於 2012年9月20日星期四UTC+8下午7時27分40秒寫道:
Hi,
Is it possible to run code object with local variables specified?
I'm trying the following code but not work:
def fn():
x = 1
y = 2
localvars = {'x': 0}
exec(fn.func_code, globals(),
A
Ian於 2012年9月22日星期六UTC+8上午4時50分49秒寫道:
On Fri, Sep 21, 2012 at 1:54 PM, 8 Dihedral
dihedral88...@googlemail.com wrote:
I don't think functional aspects are only marked as lazy
programming.
He wrote lazy evaluation, not lazy programming. Two entirely
different things
i
Rodrick Brown於 2012年9月22日星期六UTC+8上午6時33分59秒寫道:
On Sep 21, 2012, at 5:59 PM, Ethan Furman et...@stoneleaf.us wrote:
Greetings!
What is the consensus... okay, okay -- what are some wide ranging opinions
on technologies that I should know if my dream job is one that consists
andrea crotti於 2012年9月20日星期四UTC+8上午12時42分50秒寫道:
2012/9/19 Trent Nelson tr...@snakebite.org:
FWIW, I gave a presentation on decorators to the New York Python
User Group back in 2008. Relevant blog post:
http://blogs.onresolve.com/?p=48
There's a
Chris Angelico於 2012年9月18日星期二UTC+8下午9時25分04秒寫道:
On Tue, Sep 18, 2012 at 11:19 PM, Neil Cerutti ne...@norwich.edu wrote:
On 2012-09-14, Chris Angelico ros...@gmail.com wrote:
But then again, who actually ever needs fibonacci numbers?
If it should happen that your question is not
Terry Reedy於 2012年9月15日星期六UTC+8上午4時40分32秒寫道:
2nd try, hit send button by mistake before
On 9/14/2012 5:28 AM, Jean-Michel Pichavant wrote:
Decorators are very popular so I kinda already know that the fault is
mine. Now to the reason why I have troubles writing them, I don't
alex23於 2012年9月17日星期一UTC+8上午11時25分06秒寫道:
On Sep 17, 12:32 pm, Jadhav, Alok alok.jad...@credit-suisse.com
wrote:
- As you have seen, the line separator is not '\n' but its '|\n'.
Sometimes the data itself has '\n' characters in the middle of the line
and only way to find true end of
Steven D'Aprano於 2012年9月15日星期六UTC+8上午7時39分28秒寫道:
On Fri, 14 Sep 2012 15:16:47 -0600, Ian Kelly wrote:
If only there were a conceptually simpler way to do this. Actually,
there is. I give you: metadecorators!
[code snipped but shown below]
Which I think is certainly easier to
David Hutto於 2012年9月15日星期六UTC+8下午6時04分28秒寫道:
On Sat, Sep 15, 2012 at 5:45 AM, 8 Dihedral
dihedral88...@googlemail.com wrote:
Steven D'Aprano於 2012年9月15日星期六UTC+8上午7時39分28秒寫道:
On Fri, 14 Sep 2012 15:16:47 -0600, Ian Kelly wrote:
If only there were a conceptually
Chris Angelico於 2012年9月14日星期五UTC+8上午6時39分25秒寫道:
On Fri, Sep 14, 2012 at 8:33 AM, Alexander Blinne n...@blinne.net wrote:
On 13.09.2012 21:01, 8 Dihedral wrote:
def powerlist(x, n):
# n is a natural number
result=[]
y=1
for i in xrange(n
Chris Angelico於 2012年9月14日星期五UTC+8下午10時41分06秒寫道:
On Sat, Sep 15, 2012 at 12:12 AM, andrea crotti
andrea.crott...@gmail.com wrote:
def fib(n):
if n = 1:
return 1
return fib(n-1) + fib(n-2)
@memoize
def fib_memoized(n):
if n = 1:
mblume於 2012年9月14日星期五UTC+8上午12時26分17秒寫道:
Am Thu, 13 Sep 2012 17:00:19 +0100 schrieb andrea crotti:
I have to give a couple of Python presentations in the next weeks, and
I'm still thinking what is the best approach.
My idea for an introductory presentation of python was to
Paul Rubin於 2012年8月17日星期五UTC+8上午9時01分39秒寫道:
Ian Kelly ian.g.ke...@gmail.com writes:
With regard to key insertion and deletion while iterating over a dict
or set, though, there is just no good reason to be doing that
(especially as the result is very implementation-specific), and I
On Saturday, September 1, 2012 12:19:10 AM UTC+8, Chris Withers wrote:
On 23/08/2012 12:25, Tigerstyle wrote:
class FileTest(unittest.TestCase):
def setUp(self):
self.origdir = os.getcwd()
self.dirname = tempfile.mkdtemp(testdir)
Jan Kuiken於 2012年8月24日星期五UTC+8上午2時02分00秒寫道:
On 8/23/12 06:11 , Steven D'Aprano wrote:
2) Related to the above, you can infinitely nest scopes. There's nothing
wrong with having six variables called 'q'; you always use the innermost
one. Yes, this can hurt readability
Well,
Paul Rubin於 2012年8月21日星期二UTC+8上午3時29分12秒寫道:
Ian Kelly ian.g.ke...@gmail.com writes:
The difference between the two is that the former is bounded by a
constant that is fundamental to the algorithm at hand,... S is
clearly bounded by the constraints of actual shoes, so we can safely
Paul Rubin於 2012年8月21日星期二UTC+8上午3時29分12秒寫道:
Ian Kelly ian.g.ke...@gmail.com writes:
The difference between the two is that the former is bounded by a
constant that is fundamental to the algorithm at hand,... S is
clearly bounded by the constraints of actual shoes, so we can safely
On Monday, August 20, 2012 1:03:34 AM UTC+8, Blind Anagram wrote:
Steven D'Aprano wrote in message
news:502f8a2a$0$29978$c3e8da3$54964...@news.astraweb.com...
On Sat, 18 Aug 2012 01:09:26 -0700, wxjmfauth wrote:
[...]
If you can consistently replicate a 100% to 1000%
On Monday, August 20, 2012 4:42:16 AM UTC+8, kj wrote:
As far as I've been able to determine, Python does not remember
(immutably, that is) the working directory at the program's start-up,
or, if it does, it does not officially expose this information.
Does anyone know why this is?
Christian Heimes於 2012年8月15日星期三UTC+8上午2時22分54秒寫道:
Hello fellow Pythonistas,
I'm looking for co-developers, testers, documentation writers and users
for a new image library I created. The code is available at
https://bitbucket.org/tiran/smc.freeimage
Background story:
Nobody於 2012年8月7日星期二UTC+8下午11時32分55秒寫道:
On Mon, 06 Aug 2012 21:02:33 -0700, Larry Hudson wrote:
for i in range(N,N+100):
for j in range(M,M+100):
do_something(i % 100 ,j % 100)
Emile
How about...
for i in range(100):
Steven D'Aprano於 2012年8月11日星期六UTC+8下午7時26分37秒寫道:
On Fri, 10 Aug 2012 08:53:43 +1000, Chris Angelico wrote:
On Fri, Aug 10, 2012 at 8:26 AM, Dave Angel d...@davea.name wrote:
On 08/09/2012 06:03 PM, Andrew Cooper wrote:
O(n) for all other entries in the dict which suffer a hash
Dave Angel於 2012年8月10日星期五UTC+8上午5時47分45秒寫道:
On 08/09/2012 05:34 PM, Roman Vashkevich wrote:
Actually, they are different.
Put a dict.{iter}items() in an O(k^N) algorithm and make it a hundred
thousand entries, and you will feel the difference.
Dict uses hashing to get a value from
Nobody於 2012年8月7日星期二UTC+8下午11時32分55秒寫道:
On Mon, 06 Aug 2012 21:02:33 -0700, Larry Hudson wrote:
for i in range(N,N+100):
for j in range(M,M+100):
do_something(i % 100 ,j % 100)
Emile
How about...
for i in range(100):
Nobody於 2012年8月7日星期二UTC+8下午11時32分55秒寫道:
On Mon, 06 Aug 2012 21:02:33 -0700, Larry Hudson wrote:
for i in range(N,N+100):
for j in range(M,M+100):
do_something(i % 100 ,j % 100)
Emile
How about...
for i in range(100):
Andrew Cooper於 2012年8月10日星期五UTC+8上午6時03分26秒寫道:
On 09/08/2012 22:34, Roman Vashkevich wrote:
Actually, they are different.
Put a dict.{iter}items() in an O(k^N) algorithm and make it a hundred
thousand entries, and you will feel the difference.
Dict uses hashing to get a value from
Steven D'Aprano於 2012年8月7日星期二UTC+8上午10時01分05秒寫道:
On Mon, 06 Aug 2012 22:46:38 +0200, Mok-Kong Shen wrote:
If I have a string abcd then, with 8-bit encoding of each character,
there is a corresponding 32-bit binary integer. How could I best obtain
that integer and from that integer
Nobody於 2012年8月7日星期二UTC+8下午11時32分55秒寫道:
On Mon, 06 Aug 2012 21:02:33 -0700, Larry Hudson wrote:
for i in range(N,N+100):
for j in range(M,M+100):
do_something(i % 100 ,j % 100)
Emile
How about...
for i in range(100):
Mark Lawrence於 2012年7月31日星期二UTC+8下午3時15分32秒寫道:
On 31/07/2012 02:20, Dennis Lee Bieber wrote:
On Mon, 30 Jul 2012 22:56:48 +, Dan Stromberg drsali...@gmail.com
declaimed the following in gmane.comp.python.general:
Sigh, and I'm also not keen on multi-line list
Jan Riechers於 2012年7月21日星期六UTC+8下午3時33分27秒寫道:
Hello Pythonlist,
I have one very basic question about speed,memory friendly coding, and
coding style of the following easy quot;ifquot;-statement in Python 2.7,
but Im
sure its also the same in Python 3.x
Block
Chris Angelico於 2012年7月21日星期六UTC+8下午5時04分12秒寫道:
On Sat, Jul 21, 2012 at 5:33 PM, Jan Riechers lt;janpet...@freenet.degt;
wrote:
gt; Block
gt; #--
gt; if statemente_true:
gt; doSomething()
gt; else:
gt; doSomethingElseInstead()
gt;
gt;
andrea crotti於 2012年7月19日星期四UTC+8下午6時15分11秒寫道:
We need to be able to reload code on a live system. This live system
has a daemon process always running but it runs many subprocesses with
multiprocessing, and the subprocesses might have a short life...
Now I found a way to reload the code
Chris Rebert於 2012年7月16日星期一UTC+8上午9時38分53秒寫道:
On Sun, Jul 15, 2012 at 6:26 PM, hamilton lt;hamil...@nothere.comgt; wrote:
gt; Subject: Diagramming code
gt;
gt; Is there any software to help understand python code ?
What sort of diagrams? Control flow diagrams? Class diagrams? Sequence
Alister於 2012年7月12日星期四UTC+8下午5時44分15秒寫道:
On Wed, 11 Jul 2012 08:43:11 +0200, Daniel Fetchinson wrote:
gt;gt; funcs = [ lambda x: x**i for i in range( 5 ) ]
gt;gt; print funcs[0]( 2 )
gt;gt; print funcs[1]( 2 )
gt;gt; print funcs[2]( 2 )
gt;gt;
gt;gt; This gives me
gt;gt;
gt;gt; 16 16 16
On Thursday, July 12, 2012 12:34:33 AM UTC+8, Ian wrote:
On Wed, Jul 11, 2012 at 4:28 AM, Colin J. Williams lt;c...@ncf.cagt; wrote:
gt; I don#39;t understand why you would expect 1, 2, 4.
Because:
funcs[0](2) == 2 ** 0 == 1
funcs[1](2) == 2 ** 1 == 2
funcs[2](2) == 2 ** 2 == 4
gt;
On Thursday, July 12, 2012 11:51:04 AM UTC+8, Steven D#39;Aprano wrote:
On Wed, 11 Jul 2012 20:39:45 -0700, 8 Dihedral wrote:
gt; I#39;ll contribute my way of python programming:
gt;
gt; def powerb(x, b): #
gt; return x**b
Here#39;s a shorter version:
pygt; pow
lt;built
Albert van der Horst於 2012年6月22日星期五UTC+8下午11時53分01秒寫道:
In article jr4pcc$fl3$1...@dont-email.me,
Kevin Walzer k...@codebykevin.com wrote:
On 6/11/12 8:01 AM, Wolfgang Keller wrote:
Tkinter is imho honestly the very best argument if you want to make
potential new users turn their backs away
Yesterday Paid於 2012年6月10日星期日UTC+8上午6時44分44秒寫道:
I'm planning to learn one more language with my python.
Someone recommended to do Lisp or Clojure, but I don't think it's a
good idea(do you?)
So, I consider C# with ironpython or Java with Jython.
It's a hard choice...I like Visual
On Saturday, May 19, 2012 7:54:18 PM UTC+8, Colin J. Williams wrote:
On 18/05/2012 7:20 PM, Tony the Tiger wrote:
On Sun, 13 May 2012 23:36:02 +0200, Irmen de Jong wrote:
Why do you care anyway?
Wanna hide his code...?
/Grrr
Curiosity. Perhaps there are st ack-based processors
Peter Otten於 2012年4月3日星期二UTC+8下午3時54分50秒寫道:
jkn wrote:
I'm clearly not understanding the 'can't pickle instancemethod
objects' error; can someone help me to understand,
I think classes implemented in C need some extra work to make them
picklable, and that hasn't been done for
On Sunday, March 4, 2012 6:58:50 PM UTC+8, Justin Drake wrote:
I am working with an ARM Cortex M3 on which I need to port Python
(without operating system). What would be my best approach? I just
need the core Python and basic I/O.
Sounds like the JVM law suites in ANDROINDS did stimulate a
在 2012年2月29日星期三UTC+8上午1时56分43秒,Peter Otten写道:
crs...@gmail.com wrote:
I'm new to Python but have experience with a few other programming
languages(Java, Perl, JavaScript).
I'm using Python 2.7.2 and I'm trying to create and write to a file (.py)
a python class and functions from
在 2012年2月26日星期日UTC+8下午9时00分31秒,Chris Angelico写道:
On Sun, Feb 26, 2012 at 11:04 PM, Peter Otten __pete...@web.de wrote:
This is however a bit errorprone. If you accidentally write the loading code
as
fruit, beverages, vegetables = pickle.load(f)
you'll end up drinking potatoes.
You
在 2012年2月20日星期一UTC+8上午8时23分33秒,Michael Torrie写道:
On 02/18/2012 11:58 AM, SherjilOzair wrote:
Has it been considered to add shell features to python, such that it
can be used as a default shell, as a replacement for bash, etc.
I'm sure everyone would agree that doing this would make the
在 2012年2月19日星期日UTC+8上午3时21分53秒,Jabba Laci写道:
Have a look at IPython (http://ipython.org/). It can interact with the
normal shell very well.
Laszlo
On Sat, Feb 18, 2012 at 19:58, SherjilOzair sherjiloz...@gmail.com wrote:
Has it been considered to add shell features to python, such that
在 2012年2月19日星期日UTC+8上午8时36分48秒,Michael Torrie写道:
On 02/18/2012 10:46 AM, Lie Ryan wrote:
Android does have a full Linux experience; what it lacks is the GNU
experience. Unlike normal Linux distros, Android does not use GNU
userspace, instead it have its own userspace based on bionic,
在 2012年2月17日星期五UTC+8下午5时55分11秒,Nobody写道:
On Fri, 17 Feb 2012 16:53:00 +0900, Zheng Li wrote:
def method1(a = None):
print a
i can call it by
method1(*(), **{'a' : 1})
I am just curious why it works and how it works?
and what do *() and **{'a' : 1} mean?
In a function
Check PY2EXE, PYREX and PSYChO. I must use these packages
to relase commercial products with my own dll in c.
--
http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list
在 2012年2月18日星期六UTC+8上午9时51分13秒,Michael Torrie写道:
On 02/16/2012 10:25 PM, 8 Dihedral wrote:
Android is a customized linux OS used in mobile phones. I don't think
any linux systm has to be locked by JAVA or any JVM to run
applications.
Getting waaa off topic here, but...
I guess
The law suites of JAVA Vitrtual Machine from Oracle
are famous now. But in 201X the JVM patents will be
expired, thus it is not very urgent to chunk out a new jython now. Anyway just
write codes that can be maintained and ported to other languages and platforms
easily.
Then I personally prefer
在 2012年2月16日星期四UTC+8下午11时22分44秒,Michael Torrie写道:
On 02/16/2012 07:53 AM, 8 Dihedral wrote:
The law suites of JAVA Vitrtual Machine from Oracle
are famous now. But in 201X the JVM patents will be
expired, thus it is not very urgent to chunk out a new jython now. Anyway
just write
在 2012年2月16日星期四UTC+8上午10时19分15秒,geremy condra写道:
On Wed, Feb 15, 2012 at 12:58 PM, Martin Schöön martin.sch...@gmail.com
wrote:
First of all: I don't have any first hand experience of smartphones
but now that my trusted old GSM phone is getting old I decided I am
in for an up-grade. It
After my testing of JAVA, PYTHON, VB, C-sharp and Erlang like
script languages, I noticed that script languages should be
timed after the shell interpreter completed loaded.
The start up loading time of script interpreters should be excluded in the
measure of executing a byte code script.
在 2012年2月13日星期一UTC+8下午4时03分24秒,Steven D#39;Aprano写道:
On Mon, 13 Feb 2012 15:59:27 +0900, Zheng Li wrote:
how to tell a method is class method or static method or instance
method?
That's a good question, with a subtle answer that depends on exactly what
you mean by the question. If you
在 2012年2月12日星期日UTC+8下午2时41分20秒,Steven D#39;Aprano写道:
This is only peripherally a Python problem, but in case anyone has any
good ideas I'm going to ask it.
I have a routine to calculate an approximation of Lambert's W function,
and then apply a root-finding technique to improve the
在 2012年2月11日星期六UTC+8上午7时57分56秒,Paul Rubin写道:
Righard van Roy
writes:
I want to add an item to a list, except if the evaluation of that item
results in an exception.
This may be overkill and probably slow, but perhaps most in the spirit
that you're asking.
from itertools import
在 2012年2月4日星期六UTC+8上午8时27分56秒,Antti J Ylikoski写道:
In Python textbooks that I have read, it is usually not mentioned that
we can very easily program Common LISP-style closures with Python. It
is done as follows:
-
# Make a Common LISP-like closure with
I prefer to decorate a function not a method.
I prefer to decorate an object to own a new method from the existed ones
inherited in all the class levels.
I do not decorate a class if not necessary.
I believe this is more pythonic to add functionalities to objects in classes by
aggregated
在 2012年2月11日星期六UTC+8上午2时57分34秒,John Nagle写道:
On 2/10/2012 10:14 AM, Nathan Rice wrote:
Lets also not forget that knowing an object is immutable lets you do a
lot of optimizations; it can be inlined, it is safe to convert to a
contiguous block of memory and stuff in cache, etc. If you know
在 2012年1月14日星期六UTC+8上午6时48分29秒,Evan Driscoll写道:
On 01/13/2012 03:20 PM, Neil Cerutti wrote:
They perform the same action, but their semantics are different.
operator+ will always return a new object, thanks to its
signature, and operator+= shall never do so. That's the main
difference I
在 2012年1月14日星期六UTC+8上午6时48分29秒,Evan Driscoll写道:
On 01/13/2012 03:20 PM, Neil Cerutti wrote:
They perform the same action, but their semantics are different.
operator+ will always return a new object, thanks to its
signature, and operator+= shall never do so. That's the main
difference I
在 2012年1月23日星期一UTC+8上午2时01分11秒,Robert Kern写道:
On 1/22/12 3:50 PM, Rick Johnson wrote:
What does Python do when presented with this code?
py [line.strip('\n') for line in f.readlines()]
If Python reads all the file lines first and THEN iterates AGAIN to do
the strip; we are driving
101 - 200 of 290 matches
Mail list logo