x = [[1, 2], [3, 4]]
for x in x:
... for x in x:
... print(x)
This is valid in the syntax level
in python. But it is only good
for those writing obscure programs in
my opinions at most team works.
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, March 21, 2014 7:56:43 AM UTC+8, fiens...@gmail.com wrote:
Give the function call its required argument and the error will go
away... well, at least that one.
Yep, many thanks for the answer.
But... im totally beginner with Python.
I develop in Pascal and C and
On Wednesday, March 5, 2014 8:52:31 AM UTC+8, Andrew Cooper wrote:
On 03/03/2014 22:19, Cameron Simpson wrote:
On 03Mar2014 09:17, Neal Becker ndbeck...@gmail.com wrote:
Charles R Harris charlesr.har...@gmail.com Wrote in message:
Imo the lesson here is never write in low
On Thursday, February 13, 2014 11:30:27 PM UTC+8, Neil Cerutti wrote:
On 2014-02-12, Tim Delaney timothy.c.dela...@gmail.com wrote:
OK - it's degenerated into one of these threads - I'm going to
participate.
Me, too!
I wrote lots of programs, strictly for fun, on every
On Monday, March 3, 2014 10:08:11 PM UTC+8, Rustom Mody wrote:
On Monday, March 3, 2014 7:30:17 PM UTC+5:30, Chris Angelico wrote:
On Tue, Mar 4, 2014 at 12:48 AM, Rustom Mody wrote:
? [1,2] + [[3,4],[5]]
ERROR: Type error in application
*** expression : [1,2] + [[3,4],[5]]
On Sunday, February 23, 2014 12:06:13 PM UTC+8, Sam wrote:
My understanding of Python tuples is that they are like immutable lists. If
this is the cause, why can't we replace tuples with lists all the time (just
don't reassign the lists)? Correct me if I am wrong.
==
OK, lets be serious
On Friday, February 21, 2014 12:26:00 AM UTC+8, Marko Rauhamaa wrote:
Chris Angelico ros...@gmail.com:
Also, what happens if two modules (one of which might be your script)
written for different versions both import some third module? Should
they get different versions, based on
On Monday, February 3, 2014 5:16:44 AM UTC+8, Charlie Winn wrote:
Hey Guys i Need Help , When i run this program i get the 'None' Under the
program, see what i mean by just running it , can someone help me fix this
def Addition():
print('Addition: What are two your numbers?')
On Thursday, January 23, 2014 3:22:52 AM UTC+8, lgabiot wrote:
Le 22/01/14 18:31, 8 Dihedral a écrit :
Check the C source code generated
by Pyrex and check cython for what u
want, but I did try that out in any
mobile phone or flat panel
programming
On Thursday, January 23, 2014 12:37:36 AM UTC+8, Asaf Las wrote:
On Wednesday, January 22, 2014 6:18:57 PM UTC+2, Chris Angelico wrote:
On Thu, Jan 23, 2014 at 3:07 AM, Asaf Las r@gmail.com wrote:
Why not simply:
def get_singleton(x = SomeClass()):
return x
Or
On Wednesday, January 22, 2014 7:01:50 PM UTC+8, lgabiot wrote:
Hello,
working on OS X 10.8.5
Python 2.7
I've written a simple C extension for Python that uses the cairo graphic
library.
It works well, and I can call it from Python with no problem.
The only drawback is
On Friday, November 23, 2001 6:43:40 AM UTC+8, MANUEL FERNANDEZ PEREZ wrote:
Hello,
I'm looking for an editor for Python.I' m interested it works on Windows.Can
anybody help me?
Thank you
Manuel
OK, try the notepad++ at
notepad-plus-plus.org/ or use IDLE
with the pycrust.
--
On Saturday, December 21, 2013 1:10:37 AM UTC+8, rusi wrote:
On Friday, December 20, 2013 9:30:22 PM UTC+5:30, Mark Lawrence wrote:
On 20/12/2013 15:34, rusi wrote:
On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote:
y = raw_input('Enter a number:')
print
Roy Smith於 2013年12月19日星期四UTC+8下午12時16分26秒寫道:
In article 07c6e6a3-c5f4-4846-9551-434bdaba8...@googlegroups.com,
rusi rustompm...@gmail.com wrote:
Soon the foo has to split into foo1.c and foo2.c. And suddenly you need to
understand:
1. Separate compilation
2. Make
8 Dihedral dihedral88...@gmail.com wrote:
It is trivial to use UDP with
forward error correction such as
the CD in 1982.
CD uses Reed-Solomon coding, which is great for correcting the types of
errors expected on a CD. Namely, bursts of bit errors caused
On Monday, December 16, 2013 2:41:08 PM UTC+8, seas...@gmail.com wrote:
I need to replace all tag b with span after ■. But the result from below
is '■ span style=REPLACED/span / font/font'
Can you explain what I did wrong, please.
s = '■bA/b bB/b bC/b bD/b / font/font'
On Friday, December 13, 2013 5:58:49 AM UTC+8, Chris Angelico wrote:
On Fri, Dec 13, 2013 at 8:27 AM, Dan Stromberg drsali...@gmail.com wrote:
On Thu, Dec 12, 2013 at 6:16 AM, Grant Edwards invalid@invalid.invalid
wrote:
Sockets reserve the right to split one socket.send() into
On Saturday, December 14, 2013 8:12:16 PM UTC+8, Jai wrote:
GUI:-want to learn GUI programming in python , how should i proceed.
There are lots of book here so I am confuse which book i should refer so
that i don't waste time . please answer
Please check JYTHON and those
On Sunday, November 10, 2013 4:56:38 PM UTC+8, Jorgen Grahn wrote:
On Sun, 2013-11-10, Chris Angelico wrote:
On Sun, Nov 10, 2013 at 11:41 AM, Roy Smith r...@panix.com wrote:
On 09/11/2013 22:58, Chris Angelico wrote:
* Some languages are just fundamentally bad. I do not
On Tuesday, November 5, 2013 1:22:05 PM UTC+8, E.D.G. wrote:
Jim Gibson jimsgib...@gmail.com wrote in message
news:031120131018099327%jimsgib...@gmail.com...
One way to generate plot within a CGI program is this:
To start off with, I am not a CGI expert. Also, I have
On Friday, November 8, 2013 3:02:10 AM UTC+8, jsk...@gmail.com wrote:
We do not currently support cookieless or javascript-less browsing. We are
definitely looking at relying less and less on cookies, but it's unlikely
we'll ever be able to pull out javascript as it limits interactivity too
On Saturday, October 5, 2013 8:17:52 AM UTC+8, Rouslan Korneychuk wrote:
On 10/04/2013 04:23 PM, Tony the Tiger wrote:
On Wed, 02 Oct 2013 17:05:32 -0400, Rouslan Korneychuk wrote:
game
Sorry, but that sounds awful. I hate games.
This... isn't a game or even related
On Thursday, October 3, 2013 5:33:27 AM UTC+8, Terry Reedy wrote:
On 10/2/2013 8:31 AM, random...@fastmail.us wrote:
On Tue, Oct 1, 2013, at 17:30, Terry Reedy wrote:
Part of the reason that Python does not do tail call optimization is
that turning tail recursion into while iteration
On Tuesday, October 1, 2013 3:34:08 AM UTC+8, Dave Angel wrote:
On 30/9/2013 08:41, markot...@gmail.com wrote:
under variables, i mean, the int's and lists and strings and floats that
the parent class uses. IF in parent class there is variable called
location, then can i use the
gauran...@gmail.com於 2013年9月3日星期二UTC+8下午12時45分57秒寫道:
Hi Guys,
I have a requirement where i need to kill one process on remote windows
machine.
Following command just works fine if i have to kill process on local machine
os.system('taskkill /f /im processName.exe')
Fabrice Pombet於 2013年8月31日星期六UTC+8上午1時43分28秒寫道:
On Saturday, August 17, 2013 2:26:32 PM UTC+2, Fernando Saldanha wrote:
I am new to Python, with experience in Java, C++ and R.
As I understand encapsulation is not a big thing in the Python world. I
read that you can put
Devyn Collier Johnson於 2013年7月16日星期二UTC+8下午6時30分33秒寫道:
Am 07/12/2013 07:16 PM, schrieb MRAB:
On 12/07/2013 23:16, Tim Delaney wrote:
On 13 July 2013 03:58, Devyn Collier Johnson devyncjohn...@gmail.com
mailto:devyncjohn...@gmail.com wrote:
Thanks for the thorough
On Saturday, July 13, 2013 1:37:46 PM UTC+8, Steven D'Aprano wrote:
On Fri, 12 Jul 2013 13:58:29 -0400, Devyn Collier Johnson wrote:
I plan to spend some time optimizing the re.py module for Unix systems.
I would love to amp up my programs that use that module.
In my
Giampaolo Rodola'於 2013年7月11日星期四UTC+8下午11時02分01秒寫道:
Congratulations on the 1.0.0 release!
Thanks a lot. =)
Btw. any change you can put up a prebuilt installer for a 64-bit built
with Python 3.3? You have one for Python 3.2
Steven D'Aprano於 2013年7月2日星期二UTC+8上午6時09分18秒寫道:
On Mon, 01 Jul 2013 20:36:29 +0100, Marcin Szamotulski wrote:
Here is another example which I came across when playing with
generators, the first function is actually quite useful, the second
generator is the whole fun:
from
Jason Friedman於 2013年6月28日星期五UTC+8上午11時52分33秒寫道:
I was hoping to have a good laugh. :|
Although I wouldn't call it hostile.
I think the python community is being educated in how to spam and troll at
the same time.
It is possible the OP has a mental disease, which is
Thomas Heller於 2013年6月28日星期五UTC+8下午6時48分38秒寫道:
trying out the enum34 module.
What I want to create is a subclass of enum.Enum that is also
based on ctypes.c_int so that I can better use enum instances
in ctypes api calls.
When I do this, I get a metaclass conflict:
Michael Torrie於 2013年6月20日星期四UTC+8下午2時01分11秒寫道:
But since the LISP never really got a form beyond S-expressions,
leaving us with lots of parenthesis everywhere, Python wins much as the
Hitchhiker's Guide to the Galaxy wins.
Yep, a list is mutable even it's empty.
But constant integers,
rusi於 2013年6月21日星期五UTC+8上午1時12分01秒寫道:
You know Rick, you are good at python, you are better at polemics.
If only you would cut the crap I would (be able to) agree with you.
See below
On Jun 20, 7:49 pm, Rick Johnson rantingrickjohn...@gmail.com wrote:
On Thursday, June 20, 2013
Carlos Nepomuceno於 2013年6月9日星期日UTC+8下午1時23分15秒寫道:
print '\n'.join([re.findall(from '(.*)',str(v))[0] for k,v in
sys.modules.items() if str(v).find('from')-1])
Date: Sat, 8 Jun 2013 21:30:48 -0700
Subject: Listing modules from all installed packages
From: jph...@gmail.com
To:
Steven D'Aprano於 2013年5月26日星期日UTC+8上午11時50分31秒寫道:
On Sat, 25 May 2013 21:54:43 -0400, Roy Smith wrote:
Of course not every IPv6 endpoint will be able to talk to every other
IPv6 endpoint, even if the both have globally unique addresses. But,
the access controls will be
Steven D'Aprano於 2013年5月30日星期四UTC+8上午10時28分57秒寫道:
On Wed, 29 May 2013 10:50:47 -0600, Ian Kelly wrote:
On Wed, May 29, 2013 at 8:33 AM, rusi rustompm...@gmail.com wrote:
0.0 == 0.0 implies 5.4 == 5.4
is not a true statement is what (I think) Steven is saying. 0 (or if
you
Chris Angelico於 2013年5月28日星期二UTC+8下午3時11分55秒寫道:
On Tue, May 28, 2013 at 9:10 AM, Roy Smith r...@panix.com wrote:
In article mailman.2265.1369693294.3114.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
I'll use XML when I have to, but if I'm inventing my own
Carlos Nepomuceno於 2013年5月29日星期三UTC+8上午3時46分37秒寫道:
Are there Python 'preprocessor directives'?
I'd like to have something like '#ifdef' to mix code from Python 2 and 3 in a
single file.
Is that possible? How?
Use execfile(filename) at the beginning to get what you want.
The .pyc version
Grant Edwards於 2013年5月29日星期三UTC+8上午2時25分08秒寫道:
On 2013-05-28, Wolfgang Keller felip...@gmx.net wrote:
Actually productive work of significant intensity at a computer screen.
Oh. You mean emacs.
--
Grant Edwards grant.b.edwardsYow! Will it improve my
Carlos Nepomuceno於 2013年5月22日星期三UTC+8上午2時49分28秒寫道:
From: alyssonbr...@gmail.com
Date: Tue, 21 May 2013 09:03:13 -0300
Subject: Re: PEP 378: Format Specifier for Thousands Separator
To: python-list@python.org
This work in 3.1+:
$ python3
Carlos Nepomuceno於 2013年5月22日星期三UTC+8上午11時38分45秒寫道:
From: steve+comp.lang.pyt...@pearwood.info
Subject: Re: PEP 378: Format Specifier for Thousands Separator
Date: Wed, 22 May 2013 03:08:54 +
To: python-list@python.org
[...]
So, the only
Ethan Furman於 2013年5月22日星期三UTC+8上午12時30分22秒寫道:
On 05/21/2013 08:39 AM, Skip Montanaro wrote:
Don't confuse the use of static in Python with its use in C/C++. From a
post on StackOverflow:
A staticmethod is a method that knows nothing about the class or
instance it was
Chris Angelico於 2013年5月20日星期一UTC+8下午5時09分13秒寫道:
On Mon, May 20, 2013 at 6:35 PM, Cameron Simpson c...@zip.com.au wrote:
_lock = Lock()
def lprint(*a, **kw):
global _lock
with _lock:
print(*a, **kw)
and use lprint() everywhere?
Fun little
Steven D'Aprano於 2013年5月18日星期六UTC+8下午12時01分13秒寫道:
On Fri, 17 May 2013 21:18:15 +0300, Carlos Nepomuceno wrote:
I thought there would be a call to format method by '%d\n' % i. It
seems the % operator is a lot faster than format. I just stopped using
it because I read it was going
Chris Angelico於 2013年5月14日星期二UTC+8上午12時24分44秒寫道:
On Tue, May 14, 2013 at 12:53 AM, rusi rustompm...@gmail.com wrote:
int fact(int n, int acc)
{
return !n? acc : fact(n-1,acc*n);
}
-
When I run these, the C happily keeps giving answers
Chris Angelico於 2013年5月19日星期日UTC+8上午8時04分45秒寫道:
On Sun, May 19, 2013 at 9:56 AM, 8 Dihedral
dihedral88...@googlemail.com wrote:
Hey, ChisA, are you delibrately to write a recursive version
to demonstrate the stack depth problem in Python?
def fact(n):
ret=1
Rob Sutton於 2013年5月18日星期六UTC+8上午2時36分07秒寫道:
I am seeking part/full time work as a back-end Python developer (telecommute
or Utah only). I have been maintaining a
Debian/Python/Django/Apache/PostgreSQL/PHP/MySql web application for 3 years
on my own. I do all the development, database and
Serge WEINSTOCK於 2013年5月16日星期四UTC+8下午4時55分07秒寫道:
Hi,
I'm currently writing a C extension module for python using the raw C-API.
I would like to be able to define nested classes like in the following
python code
Chris Angelico於 2013年5月14日星期二UTC+8上午1時36分34秒寫道:
On Mon, May 13, 2013 at 8:17 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
Let's look at his major criticisms:
1) values aren't automatically generated.
True. So what? That is the *least* important part of
Chris Angelico於 2013年5月12日星期日UTC+8上午12時00分44秒寫道:
On Sun, May 12, 2013 at 1:47 AM, Anssi Saari a...@sci.fi wrote:
Chris Angelico ros...@gmail.com writes:
On Thu, May 9, 2013 at 9:30 PM, Jussi Piitulainen
jpiit...@ling.helsinki.fi wrote:
8 Dihedral writes
Jussi Piitulainen於 2013年5月9日星期四UTC+8下午7時30分05秒寫道:
8 Dihedral writes:
This is just the handy style for a non-critical loop.
In a critical loop, the number of the total operation counts
does matter in the execution speed.
Do you use speed often?
There is another
Jussi Piitulainen於 2013年5月9日星期四UTC+8下午2時55分20秒寫道:
RAHUL RAJ writes:
Checkout the following code:
sample2 = [x+y for x in range(1,10) for y in range(1,10) if x!=y]
output=[]
output=[x for x in sample2 if x not in output]
the output I get is
3 4 5 6 7 8 9 10
Chris Angelico於 2013年5月7日星期二UTC+8下午9時32分55秒寫道:
On Tue, May 7, 2013 at 11:22 PM, jmfauth wxjmfa...@gmail.com wrote:
There are plenty of good reasons to use Python. There are
also plenty of good reasons to not use (or now to drop)
Python and to realize that if you wish to process text
Steven D'Aprano於 2013年5月6日星期一UTC+8上午3時10分47秒寫道:
On Sun, 05 May 2013 12:11:11 -0500, Ignoramus16992 wrote:
According to CIO.com, Python programmers make only $83,000 per year,
while Perl programmers make $93,000 per year.
Bradley Wright於 2013年5月6日星期一UTC+8上午8時59分15秒寫道:
Hey guys and gals doing this tutorial(codecademy) and needed a bit help from
the experienced.
I'm writing a function that takes a list(one they supply during runtime)
here's what my function is supposed to do
1. for each instance
Jimmie He於 2013年4月30日星期二UTC+8上午1時20分49秒寫道:
I'm trying to read in the BMP data by the the code below,and I'm check the
data array with WINHEX,and it is correct,but which confuse me is why the size
is 0x180,but the actual picture should be 48*48 = 0x120 bytes because I use
1-bit BMP not the
Roy Smith於 2013年4月25日星期四UTC+8上午7時50分33秒寫道:
I discovered something really neat today.
We've got a system with a bunch of rules. Each rule is a method which
returns True or False. At some point, we need to know if all the rules
are True. Complicating things, not all the rules are
Chris Angelico於 2013年4月27日星期六UTC+8上午12時52分38秒寫道:
On Sat, Apr 27, 2013 at 1:54 AM, MRAB pyt...@mrabarnett.plus.com wrote:
On 26/04/2013 14:02, anatoly techtonik wrote:
This circular reference problem is interesting. In object space it
probably looks like a stellar detached from the
Ana Dionísio於 2013年4月23日星期二UTC+8上午2時13分38秒寫道:
Hello!
I need your help!
I have an array and I need pick some data from that array and put it in a
list, for example:
array= [a,b,c,1,2,3]
list=array[0]+ array[3]+ array[4]
list: [a,1,2]
When I do it like
Blind Anagram於 2013年4月22日星期一UTC+8下午7時58分20秒寫道:
I would be grateful for any advice people can offer on the fastest way
to count items in a sub-sequence of a large list.
I have a list of boolean values that can contain many hundreds of
millions of elements for which I want to count the
jmfauth於 2013年4月21日星期日UTC+8上午1時12分43秒寫道:
In a previous post,
http://groups.google.com/group/comp.lang.python/browse_thread/thread/6aec70817705c226#
,
Chris “Kwpolska” Warrick wrote:
“Is Unicode support so hard, especially in the 21st century?”
--
Unicode is
Uday S Reddy於 2013年4月17日星期三UTC+8下午5時10分58秒寫道:
Mark Janssen writes:
Having said that, theorists do want to unify concepts wherever possible
and wherever they make sense. Imperative programming types, which I
will call storage types, are semantically the same as classes.
Ned Batchelder於 2013年4月20日星期六UTC+8上午12時41分03秒寫道:
On 4/19/2013 12:16 PM, Steven D'Aprano wrote:
On Fri, 19 Apr 2013 12:02:00 -0400, Roy Smith wrote:
PS: a great C++ interview question is, What's the difference between a
class and a struct? Amazing how few self-professed C++
Serhiy Storchaka於 2013年4月17日星期三UTC+8下午5時35分07秒寫道:
17.04.13 07:57, Larry Hudson написав(ла):
So using a list comprehension you can do it in two lines:
def get_rule(num):
bs = bin(num)[2:]
return [0] * (8 - len(bs)) + [int(i) for i in bs]
You can do it in one
Ian於 2013年4月17日星期三UTC+8下午3時21分00秒寫道:
On Tue, Apr 16, 2013 at 8:57 PM, Bruce McGoveran
wrote:
These are terms that appear in section 5 (Expressions) of the Python online
documentation. I'm having some trouble understanding what, precisely,
these terms mean. I'd appreciate the
zipher於 2013年4月15日星期一UTC+8上午11時48分05秒寫道:
Hello,
I'm new to the list and hoping this might be the right place to
introduce something that has provoked a bit of an argument in my
programming community.
I'll state about my opinions about the imperative and
non-imperative part.
If the
Charles Hixson於 2013年4月15日星期一UTC+8上午7時12分11秒寫道:
What is the best approach to implementing actors that accept and post
messages (and have no other external contacts).
So far what I've come up with is something like:
actors = {}
mailboxs = {}
Stuff actors with actor
Steven D'Aprano於 2013年4月12日星期五UTC+8上午8時06分21秒寫道:
On Thu, 11 Apr 2013 19:55:53 +, Neil Cerutti wrote:
On 2013-04-11, Rob Schneider rmsc...@gmail.com wrote:
Thanks. Yes, there is a close function call before the copy is
launched. No other writes. Does Python wait for file close
David M Chess於 2013年4月12日星期五UTC+8下午11時37分28秒寫道:
Roy Smith r...@panix.com
As part of our initial interview screen, we give
applicants some small
coding problems to do. One of the things we see a lot is what
you could
call Java code smell. This is our clue that the
person
Surya Kasturi於 2013年4月2日星期二UTC+8下午10時54分25秒寫道:
Hi, hope you can help me on it..
with open(pickle_f, 'r') as fhand:
obj = pickle.load(fhand)
This works on linux but not in windows until I use rb mode while creating
file object. Surprisingly, the rb mode is not working
Jason Swails於 2013年3月28日星期四UTC+8上午4時33分08秒寫道:
On Wed, Mar 27, 2013 at 3:49 PM, Joseph L. Casale jca...@activenetwerx.com
wrote:
I have a class which sets up some class vars, then several methods that are
passed in data
and do work referencing the class vars.
I want to
Chris Angelico於 2013年3月28日星期四UTC+8上午11時40分17秒寫道:
On Thu, Mar 28, 2013 at 2:18 PM, Ethan Furman et...@stoneleaf.us wrote:
Has anybody else thought that [jmf's] last few responses are starting to
sound
bot'ish?
Yes, I did wonder. It's like he and Dihedral have been trading
bartolom...@gmail.com於 2013年3月21日星期四UTC+8下午4時52分17秒寫道:
In Python 3, free variable and nonlocal variable are synonym terms? Or is
there a difference, like a free variable is a variable that is not a local
variable, then nonlocal variables and global variables are both free
variables?
zipher於 2013年3月19日星期二UTC+8上午1時04分36秒寫道:
On Sun, Mar 17, 2013 at 11:46 PM, Steven D'Aprano st...@pearwood.info wrote:
I am very interested in this as a concept, although I must admit I'm not
entirely sure what you mean by it. I've read your comment on the link above,
and subsequent
Wolfgang Maier於 2013年3月13日星期三UTC+8下午6時43分38秒寫道:
Steven D'Aprano steve+comp.lang.python at pearwood.info writes:
On Tue, 12 Mar 2013 17:03:08 +, Norah Jones wrote:
For example:
a=[-15,-30,-10,1,3,5]
I want to find a negative and a positive minimum.
Oscar Benjamin於 2013年3月12日星期二UTC+8下午11時44分50秒寫道:
On 12 March 2013 14:59, Oscar Benjamin oscar.j.benja...@gmail.com wrote:
Numpy and matplotlib will do what you want:
import numpy as np
import matplotlib.pyplot as plt
def bits_to_ndarray(bits, shape):
abytes =
Ben Sizer於 2013年3月7日星期四UTC+8上午12時56分09秒寫道:
On Wednesday, 6 March 2013 16:22:56 UTC, Chris Angelico wrote:
Effectively, you would need to have a
subclass of list/dict/tuple/whatever that can respond to the change.
This is certainly something I'd be interested in having, but I
On Tuesday, March 5, 2013 6:55:06 AM UTC+8, CM wrote:
The main issue is that python has dynamic typing. The type of object
that is referenced by a particular name can vary, and there's no way
(in general) to know at compile time what the type of object foo is.
That makes
On Tuesday, March 5, 2013 3:20:28 AM UTC+8, ian douglas wrote:
On 03/04/2013 11:06 AM, io wrote:
esclusioni_file = open('/home/io/btc_trading/exclusions.txt','r')
Windows error :
Traceback (most recent call last):
File C:\btc_trading\scripts
kramer65於 2013年3月1日星期五UTC+8上午4時25分07秒寫道:
Hello,
I'm using Python for a while now and I love it. There is just one thing I
cannot understand. There are compilers for languages like C and C++. why is
it impossible to create a compiler that can compile Python code to
machinecode?
Rick Johnson於 2013年2月14日星期四UTC+8上午12時34分11秒寫道:
On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote:
d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'}
'abcdefgabc'.translate(d)
'A2CdefgA2C'
def jmTranslate(s, table):
... table = {ord(k):table[k]
DaGeek247於 2013年2月14日星期四UTC+8上午3時47分36秒寫道:
I am using the windows api feature getasynckeystate() to check the status of
every key pressed; like this;
#always checking
while(True):
#iterate through list of ascii codes
for num in range(0,127):
#if ascii code key
Rick Johnson於 2013年2月13日星期三UTC+8上午1時48分07秒寫道:
On Monday, February 11, 2013 11:55:19 PM UTC-6, Chris Angelico wrote:
On Tue, Feb 12, 2013 at 12:06 PM, 8 Dihedral wrote:
A permanently mutated list is a tuple of constant objects.
I nominate this line as bemusing head-scratcher
Rick Johnson於 2013年2月11日星期一UTC+8下午9時13分58秒寫道:
On Monday, February 11, 2013 6:40:23 AM UTC-6, Chris Angelico wrote:
[...]
Or doing what you were pointing and laughing at Pike for, and using
two-symbol delimiters. You could even make it majorly logical:
list_ = [[ 1, 2, 3 ]]
Steven D'Aprano於 2013年2月9日星期六UTC+8上午11時36分52秒寫道:
Rick Johnson wrote:
The solution is simple. Do not offer the copy-mutate methods and force
all mutation to happen in-place:
py l = [1,2,3]
py l.reverse
py l
[3,2,1]
If the user wants a mutated copy he
Jason Swails於 2013年1月31日星期四UTC+8上午8時34分03秒寫道:
Hello,
I was having some trouble understanding decorators and inheritance and all
that. This is what I was trying to do:
# untested
class A(object):
def _protector_decorator(fcn):
def newfcn(self, *args, **kwargs):
subhaba...@gmail.com於 2013年2月2日星期六UTC+8上午1時17分04秒寫道:
Dear Group,
I am looking for a Python implementation of Maximum Likelihood Estimation. If
any one can kindly suggest. With a google search it seems
scipy,numpy,statsmodels have modules, but as I am not finding proper example
在 2013年2月2日星期六UTC+8上午2时47分22秒,subhaba...@gmail.com写道:
On Friday, February 1, 2013 11:07:48 PM UTC+5:30, 8 Dihedral wrote:
subhaba...@gmail.com於 2013年2月2日星期六UTC+8上午1時17分04秒寫道:
Dear Group,
I am looking for a Python implementation
noydb於 2013年1月31日星期四UTC+8下午9時33分48秒寫道:
I'm looking for knowlegde about how best to go about converting a binary file
(from a GPS unit) to GPX/XML. I am completely clueless on this, so any
start-from-the-beginning info would be greatly appreciated! I'm guessing the
level of effort will be
Chris Angelico於 2013年1月12日星期六UTC+8下午12時40分36秒寫道:
On Sat, Jan 12, 2013 at 3:34 PM, Rick Johnson
rantingrickjohn...@gmail.com wrote:
*The problem:*
... is readability. The current dot syntax used ubiquitously in paths is
not conveying the proper information to the reader, and in-fact
Ian於 2013年1月12日星期六UTC+8下午3時36分43秒寫道:
On Fri, Jan 11, 2013 at 10:28 PM, Rick Johnson
rantingrickjohn...@gmail.com wrote:
On Friday, January 11, 2013 12:30:27 AM UTC-6, Chris Angelico wrote:
Why is it better to import from the current directory first?
Opps. I was not explicit
在 2013年1月10日星期四UTC+8下午7时34分23秒,Duncan Booth写道:
Dave Cinege d...@cinege.com wrote:
You will notice that the code is disgusting simple. However I have
found that this has completely changed the way I program in python.
I've re-written some exiting programs using Thesaurus, and often
Michael Torrie於 2013年1月10日星期四UTC+8上午11時04分31秒寫道:
On 01/09/2013 07:11 PM, iMath wrote:
can you give me an example code ?
No but I can suggest some alternative ideas, such as using httplib
(built into python), or libcurl. Or if you have to use wget, you run it
the same way you
chaouche yacine於 2013年1月6日星期日UTC+8上午6時34分38秒寫道:
The compiler reads your source code and parses it into parse trees. This is
first step. It then takes the parse trees and transform them into abstract
syntax trees, which are like a DOM tree in an HTML file, and then transform
that AST into a
On Monday, December 31, 2012 12:18:48 PM UTC+8, contro opinion wrote:
here is my haha class
class haha(object):
def theprint(self):
print i am here
The definition of a class named haha.
haha().theprint()
i am here
haha(object).theprint()
Traceback (most recent call last):
On Tuesday, January 1, 2013 11:10:48 AM UTC+8, Steven D'Aprano wrote:
On Sat, 29 Dec 2012 18:56:57 -0500, Terry Reedy wrote:
On 12/29/2012 2:48 PM, Quint Rankid wrote:
Given a list like:
w = [1, 2, 3, 1, 2, 4, 4, 5, 6, 1]
I would like to be able to do the following as a
On Monday, November 5, 2012 3:07:12 PM UTC+8, Chris Rebert wrote:
On Sun, Nov 4, 2012 at 10:27 PM, Demian Brecht demianbre...@gmail.com wrote:
So, here I was thinking oh, this is a nice, easy way to initialize a 4D
matrix (running 2.7.3, non-core libs not allowed):
m = [[None] * 4]
On Wednesday, September 5, 2012 10:41:19 PM UTC+8, Steven D'Aprano wrote:
On Wed, 05 Sep 2012 10:00:09 -0400, Dave Angel wrote:
On 09/05/2012 09:19 AM, Franck Ditter wrote:
Thanks to all, but :
- I should have said that I work with Python 3. Does that matter ? -
May I
andrew...@gmail.com於 2012年10月29日星期一UTC+8上午11時12分11秒寫道:
The slice operator does not give any way (I can find!) to take slices from
negative to positive indexes, although the range is not empty, nor the
expected indexes out of range that I am supplying.
Many programs that I write would
1 - 100 of 290 matches
Mail list logo