On 04/09/11 08:59, candide wrote:
Le 09/04/2011 00:03, Ethan Furman a écrit :
bool([x])
Convert a value to a Boolean, using the standard truth testing
procedure.
As you can see, the parameter name is 'x'.
OK, your response is clarifying my point ;)
I didn't realize that
On 04/04/11 19:34, Antoon Pardon wrote:
On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote:
rewriting cmp_to_key in C is underway
http://bugs.python.org/issue11707
Nice to know! Any chance this wil get into 2.7.x?
Python 2.7 still have list.sort(cmp=...)/sorted(cmp=...), so
On 12/11/10 11:37, Dan Stromberg wrote:
On Fri, Dec 10, 2010 at 3:51 PM, John Nagle na...@animats.com wrote:
On 12/10/2010 3:25 PM, Stefan Behnel wrote:
Benjamin Kaplan, 11.12.2010 00:13:
On Fri, Dec 10, 2010 at 5:46 PM, Octavian Rasnita wrote:
The only scopes Python has are module and
On 12/11/10 23:43, Octavian Rasnita wrote:
Hi,
Is there a recommended Python distribution for Windows XP?
I know about the one that can be downloaded from python.org (which I am using
for the moment) and the one offered by ActiveState but I don't know which one
is better for a beginner
On 12/05/10 15:52, Tim Harig wrote:
On 2010-12-05, Tim Harig user...@ilthio.net wrote:
Another, questionable but useful use, is to ignore the complex accounting
of your position inside of a complex data structure. You can continue
moving through the structure until an exception is raised
On 12/05/10 10:43, Jorge Biquez wrote:
I do not see a good reason for not using Sqlite3 BUT if for some reason
would not be an option what plain schema of files would you use?
Assuming you don't want SQL, you can use filesystem-based database. Most
people doesn't realize that a filesystem
On 10/26/10 06:56, Steve Holden wrote:
On 10/25/2010 3:11 PM, kj wrote:
In mailman.232.1288020268.2218.python-l...@python.org Steve Holden
st...@holdenweb.com writes:
On 10/25/2010 10:47 AM, rantingrick wrote:
On Oct 25, 5:07 am, kj no.em...@please.post wrote:
In The Zen of Python, one of
On 10/24/10 21:37, huisky wrote:
Hi,
I'm trying to use the interactive mode under DOS for Python 2.7. As a
newbie, I do NOT know what is the following problem:
world_is_flat=1
if world_is_flat:
.. . . print be carefule to be not fall out!
File stdin, line 2
print be carefule
On 10/24/10 16:01, Steve Holden wrote:
I was somewhat surprised to discover that Python 3 no longer allows an
exception to be raised in an except clause (or rather that it reports it
as a separate exception that occurred during the handling of the first).
FYI, Java has a similar behavior. In
On 10/01/10 00:24, TheFlyingDutchman wrote:
If I had to choose between blow up or invalid answer I would pick
invalid answer.
there are some application domains where neither option would be
viewed as a satisfactory error handling strategy. Fly-by-wire, petro-
chemicals, nuclear power
On 10/02/10 20:04, Nick Keighley wrote:
In a statically typed language, the of-the-wrong-type is something which
can, by definition, be caught at compile time.
Any time something is true by definition that is an indication that
it's not a particularly useful fact.
I'm not sure I
On 10/05/10 14:36, salil wrote:
So, the programmer who
specifically mentions Int in the signature of the function, is
basically overriding this default behavior for specific reasons
relevant to the application, for example, for performance. I think
Haskell's way is the right.
I agree that
On 10/01/10 23:56, BartC wrote:
Pascal J. Bourguignon p...@informatimago.com wrote in message
news:87zkuyjawh@kuiper.lan.informatimago.com...
BartC b...@freeuk.com writes:
Pascal J. Bourguignon p...@informatimago.com wrote in message
When Intel will realize that 99% of its users are
On 09/30/10 16:09, TheFlyingDutchman wrote:
That argument can be made for dynamic language as well. If you write in
dynamic language (e.g. python):
def maximum(a, b):
return a if a b else b
The dynamic language's version of maximum() function is 100% correct --
if you passed an
On 09/30/10 11:17, Seebs wrote:
On 2010-09-30, RG rnospa...@flownet.com wrote:
That the problem is elsewhere in the program ought to be small
comfort.
It is, perhaps, but it's also an important technical point: You CAN write
correct code for such a thing.
int maximum(int a, int b) {
On 09/22/10 02:44, Diez B. Roggisch wrote:
Antoine Pitrou solip...@pitrou.net writes:
On Tue, 21 Sep 2010 17:59:27 +0200
de...@web.de (Diez B. Roggisch) wrote:
The problems explained are simply outdated and crippled python
versions.
And to me, a python version installed that has not the
On 09/19/10 17:31, Seebs wrote:
Basically, think of what happens as I read each symbol:
x = x + 1 if condition else x - 1
Up through the '1', I have a perfectly ordinary assignment of a value.
The, suddenly, it retroactively turns out that I have misunderstood
everything I've
On 09/20/10 19:59, Tim Harig wrote:
On 2010-09-20, Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
On Mon, 20 Sep 2010 05:46:38 +, Tim Harig wrote:
I'm not particularly convinced that these are *significant* complaints
about URL-shorteners. But I will say, of the last couple
On 09/18/10 03:53, Ethan Furman wrote:
Lie Ryan wrote:
[snip]
And even dict-syntax is not perfect for accessing XML file, e.g.:
a
bfoo/b
bbar/b
/a
should a['b'] be 'foo' or 'bar'?
Attribute style access would also fail in this instance -- how is this
worked-around
I was expecting this to work:
import logging
logger = logging.getLogger(__name__)
logger.warn('this is a warning')
instead it produced the error:
No handlers could be found for logger __main__
However, if instead I do:
import logging
logging.warn('creating logger')
logger =
On 09/16/10 03:38, Ed Greenberg wrote:
I'm pretty new to Python, but I am really enjoying it as an alternative
to Perl and PHP.
When I run the debugger [import pdb; pdb.set_trace()] and then do next
and step, and evaluate variables, etc, when I hit 'c' for continue, we
go to the end, just
On 09/17/10 07:46, John Nagle wrote:
There's a tendency to use dynamic attributes in Python when
trying to encapsulate objects from other systems. It almost
works. But it's usually a headache in the end, and should be
discouraged. Here's why.
I personally love them, they makes XML files
On 09/12/10 08:53, John Nagle wrote:
On 9/11/2010 9:36 AM, Lie Ryan wrote:
On 09/12/10 00:33, Bearophile wrote:
Lately while I program with Python one of the D features that I most
miss is a built-in Design By Contract (see PEP 316), because it avoids
(or helps me
On 09/12/10 00:33, Bearophile wrote:
Lately while I program with Python one of the D features that I most
miss is a built-in Design By Contract (see PEP 316), because it avoids
(or helps me to quickly find and fix) many bugs. In my opinion DbC is
also very good used with
On 09/01/10 17:06, Stefan Behnel wrote:
MRAB, 31.08.2010 23:53:
On 31/08/2010 21:18, Terry Reedy wrote:
On 8/31/2010 12:33 PM, Aleksey wrote:
On Aug 30, 10:38 pm, Tobias Weber wrote:
Hi,
whenever I type an object literal I'm unsure what optimisation
will do
to it.
Optimizations are
On 09/01/10 00:09, Aahz wrote:
In article mailman.239.1283257496.29448.python-l...@python.org,
Jerry Hill malaclyp...@gmail.com wrote:
On Mon, Aug 30, 2010 at 7:42 PM, Aahz a...@pythoncraft.com wrote:
Possibly; IMO, people should not need to run timeit to determine basic
algorithmic speed
On 08/17/10 12:59, AK wrote:
On 08/16/2010 10:42 PM, James Mills wrote:
On Tue, Aug 17, 2010 at 12:35 PM, AKandrei@gmail.com wrote:
As monitors are getting bigger, is there a general change in opinion on
the 79 chars limit in source files? I've experimented with 98 characters
per line
On 08/16/10 21:54, David Cournapeau wrote:
On Mon, Aug 16, 2010 at 9:53 AM, Gregory Ewing
greg.ew...@canterbury.ac.nz wrote:
On Aug 7, 2010, at 9:14 PM, John Nagle wrote:
The languages which have real multidimensional arrays, rather
than arrays of arrays, tend to use 1-based subscripts.
On 08/10/10 06:36, Bartc wrote:
And if the context is Python, I doubt whether the choice of 0-based over a
1-based makes that much difference in execution speed.
And I doubt anyone cares about execution speed when deciding whether to
use 1-based or 0-based array. The reason why you want to
Sorry the message gets cuts off by an accidental press of send button.
On 08/14/10 04:31, Lie Ryan wrote:
On 08/10/10 06:36, Bartc wrote:
And if the context is Python, I doubt whether the choice of 0-based over a
1-based makes that much difference in execution speed.
And I doubt anyone
On Wed, 28 Jul 2010 15:58:29 +0200, Ulrich Eckhardt
eckha...@satorlaser.com wrote:
wheres pythonmonks wrote:
Thanks ... I thought int was a type-cast (like in C++) so I
assumed I
couldn't reference it.
Firstly, int is a class. Python doesn't make a distinction
between builtin
types and
On Wed, 28 Jul 2010 09:15:24 -0400, wheres pythonmonks
wherespythonmo...@gmail.com wrote:
A new python convert is now looking for a replacement for another
perl idiom.
A functional alternative:
l = ...
seqint = compose(map, int)
print f(seqint(l))
--
On Tue, 27 Jul 2010 11:07:09 GMT, whitey m...@here.com wrote:
hi all. am totally new to python and was wondering if there are any
newsgroups that are there specifically for beginners.
Yes, Python Tutor list is specifically aimed for beginners. You can
access it by subscribing to either
On 07/01/10 20:56, egbert wrote:
self.__dict__[namestring][keystring]=value
try this:
getattr(self, namestring)[keystring] = value
--
http://mail.python.org/mailman/listinfo/python-list
On 06/27/10 11:24, Steven D'Aprano wrote:
Producing print function takes a little bit more effort than producing a
print statement.
(1) The main use-cases for print are quick (and usually dirty) scripts,
interactive use, and as a debugging aid.
That is precisely how the quick-and-dirty
On 07/01/10 01:30, Stephen Hansen wrote:
On 6/30/10 5:52 AM, Lie Ryan wrote:
On 06/27/10 11:24, Steven D'Aprano wrote:
Producing print function takes a little bit more effort than
producing a
print statement.
(1) The main use-cases for print are quick (and usually dirty) scripts
On 07/01/10 01:42, Michele Simionato wrote:
On Jun 30, 2:52 pm, Lie Ryan lie.1...@gmail.com wrote:
On 06/27/10 11:24, Steven D'Aprano wrote:
Producing print function takes a little bit more effort than producing a
print statement.
(1) The main use-cases for print are quick (and usually
On 06/27/10 02:33, Thomas Jollans wrote:
And here's the disadvantages:
-The Python 3 syntax actually requires more keystrokes.
Typically ONE extra character: the closing bracket. The opening bracket
can replace the whitespace previously required.
What really matters is not the number
On 06/20/10 20:57, DivX wrote:
On 20 lip, 12:46, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Sun, 20 Jun 2010 03:19:48 -0700, DivX wrote:
On 20 lip, 02:52, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
[...]
I think that mixing assembly and python is a
On 06/18/10 19:19, Jean-Michel Pichavant wrote:
Deadly Dirk wrote:
I cannot get right the super() function:
Python 3.1.1+ (r311:74480, Nov 2 2009, 14:49:22) [GCC 4.4.1] on linux2
Type copyright, credits or license() for more information.
No Subprocess
class P:
On 06/18/10 20:31, someone wrote:
On Jun 18, 12:01 pm, Gabriel Genellina gagsl-...@yahoo.com.ar
wrote:
En Fri, 18 Jun 2010 06:48:34 -0300, someone petshm...@googlemail.com
escribió:
is it possible to make first attr variable?
some_object.attr.attr
so instead of attr I could use
On 06/18/10 20:00, bart.c wrote:
(I
don't know if Python allows circular references, but that would give
problems anyway: how would you even print out such a list?)
Python uses ellipsis to indicate recursive list:
a = [1, 2, 3]
a.append(a)
a
[1, 2, 3, [...]]
--
On 06/17/10 20:21, candide wrote:
Let's the following code :
t=[[0]*2]*3
t
[[0, 0], [0, 0], [0, 0]]
t[0][0]=1
t
[[1, 0], [1, 0], [1, 0]]
Rather surprising, isn't it ? So I suppose all the subarrays reférence
the same array :
id(t[0]), id(t[1]), id(t[2])
(3077445996L, 3077445996L,
On 06/18/10 09:20, bart.c wrote:
J Kenneth King ja...@agentultra.com wrote in message
news:87wrtxh0dq@agentultra.com...
candide cand...@free.invalid writes:
Let's the following code :
t=[[0]*2]*3
t
[[0, 0], [0, 0], [0, 0]]
t[0][0]=1
t
[[1, 0], [1, 0], [1, 0]]
Rather surprising,
On 06/15/10 21:49, superpollo wrote:
goal (from e.c.m.): evaluate
1^2+2^2+3^2-4^2-5^2+6^2+7^2+8^2-9^2-10^2+...-2010^2, where each three
consecutive + must be followed by two - (^ meaning ** in this context)
my solution:
s = 0
for i in range(1, 2011):
s += i**2
if not
On 06/16/10 12:43, John Nagle wrote:
Is it possible to override __setattr__ of a module? I
want to capture changes to global variables for debug purposes.
None of the following seem to have any effect.
modu.__setattr__ = myfn
setattr(modu, __setattr__, myfn)
On 06/10/10 09:03, Bryan wrote:
Lie Ryan wrote:
I went through the mathematical foundation of using
partition/distribution and inclusion-exclusion, and have written some
code that solves a subset of the problem, feel free if you or superpollo
are interested in continuing my answer (I won't
On 06/10/10 21:52, Nobody wrote:
Spawning child processes to perform tasks
which can easily be performed in Python is inefficient
Not necessarily so, recently I wrote a script which takes a blink of an
eye when I pipe through cat/grep to prefilter the lines before doing
further complex
On 06/09/10 08:20, Martin P. Hellwig wrote:
However I don't think that x11 represents that majority (just a gut
feeling I have no data to back this claim up) of gui users, so an equal
solution should be found for windows and macs.
I do think it is technically possible to have your own
On 06/09/10 01:17, bart.c wrote:
Grant Edwards inva...@invalid.invalid wrote in message
news:hullf3$hl...@reader1.panix.com...
On 2010-06-08, Kevin Walzer k...@codebykevin.com wrote:
Since Tk already provides a basic GUI toolset, and Python can interface
with it more directly than it can
On 06/09/10 07:44, Deadly Dirk wrote:
I am a total beginner with Python. I am reading a book (The Quick Python
Book, 2nd edition, by Vernon Ceder) which tells me that print function
takes end= argument not to print newline character. I tried and here is
what happens:
print(x)
abc
On 06/07/10 19:31, Richard Thomas wrote:
On Jun 7, 10:17 am, Peter Otten __pete...@web.de wrote:
Alfred Bovin wrote:
I'm working on something where I need to read a (binary) file bit by bit
and do something depending on whether the bit is 0 or 1.
Any help on doing the actual file reading is
On 06/07/10 20:18, Adam Tauno Williams wrote:
On Mon, 2010-06-07 at 13:19 +1000, Lie Ryan wrote:
On 06/07/10 12:18, Adam Tauno Williams wrote:
But then I don't know any of the local Python devs who use IDLE; the
IDE landscape for Python is very fragmented, which disincentives that
happening
On 06/06/10 12:22, ant wrote:
I get the strong feeling that nobody is really happy with the state of
Python GUIs.
Tkinter is not widely liked, but is widely distributed. WxPython and
PyGtk are both
powerful, but quirky in different ways. PyQt is tied to one platform.
And there are
dozens
On 06/06/10 22:09, Petite Abeille wrote:
On Jun 6, 2010, at 12:52 PM, Steven D'Aprano wrote:
Yes, just wait until somebody builds a web-browser that runs in your web-
browser!
There you go:
A good browser should be able to reproduce itself. Safari 4, built entirely
with valid HTML5
On 06/07/10 03:22, rantingrick wrote:
On Jun 6, 12:02 pm, Alain Ketterlin al...@dpt-info.u-strasbg.fr
wrote:
rantingrick rantingr...@gmail.com writes:
I've not used map since I learned about list comprehensions.
Thats has been my experienced also. Actually i've been at Python for
O...
On 06/07/10 00:05, Franck Ditter wrote:
Just an advice as I see that old Python is maintained.
When starting with Python (simple programs and GUIs) should I start
with Python 3.x ? If it has a decent implementation on Mac/Linux/Windows of
course...
I say, if you're learning the language
On 06/07/10 05:54, D'Arcy J.M. Cain wrote:
On Mon, 07 Jun 2010 05:27:43 +1000
Lie Ryan lie.1...@gmail.com wrote:
In the most naive uses, map appears to have no advantage over list
comprehension; but one thing that map can do that list comprehension
still can't do without a walk around
On 06/07/10 09:56, D'Arcy J.M. Cain wrote:
On Mon, 07 Jun 2010 05:59:02 +1000
Lie Ryan lie.1...@gmail.com wrote:
foo = lambda x: [y + 1 for y in x]
[foo(x) for x in [[4, 6, 3], [6, 3, 2], [1, 3, 5]]]
Didn't seem like such a long walk.
that's because you're simplifying the problem
On 06/07/10 10:45, D'Arcy J.M. Cain wrote:
On Mon, 07 Jun 2010 10:17:39 +1000
Ben Finney ben+pyt...@benfinney.id.au wrote:
So you say. For the interface to be “better” it needs to keep the good
features of the existing interface. I include among the good features of
Usenet:
That's a great
On 06/07/10 10:48, Adam Tauno Williams wrote:
On Sun, 2010-06-06 at 17:03 -0700, AD. wrote:
On Jun 7, 10:55 am, ant shi...@uklinux.net wrote:
My concern is simple: I think that Python is doomed to remain a minor
language unless we crack this problem.
I'm curious why you think fragmented GUI
On 06/07/10 12:18, Adam Tauno Williams wrote:
On Mon, 2010-06-07 at 11:11 +1000, Lie Ryan wrote:
On 06/07/10 10:48, Adam Tauno Williams wrote:
On Sun, 2010-06-06 at 17:03 -0700, AD. wrote:
On Jun 7, 10:55 am, ant shi...@uklinux.net wrote:
My concern is simple: I think that Python is doomed
On 06/05/10 15:43, GZ wrote:
On Jun 4, 8:37 pm, Lie Ryan lie.1...@gmail.com wrote:
On06/05/10 07:51, GZ wrote:
No, rsync does not solve my problem.
I want a library that does unix 'diff' like function, i.e. compare two
strings line by line and output the difference. Python's difflib does
On 06/05/10 12:34, John Bokma wrote:
Lie Ryan lie.1...@gmail.com writes:
If you look at Stack Overflow, the highest voted questions are:
- Hidden Features of C#?
- What is the single most influential book every programmer should read?
- What's your favorite programmer cartoon?
- What
On 05/31/10 20:19, Payal wrote:
Hi,
I am trying to learn Python (again) and have some basic doubts which I
hope someone in the list can address. (English is not my first language and I
have no CS background except I can write decent shell scripts)
When I type help(something) e.g.
On 06/05/10 21:24, Lie Ryan wrote:
On 05/31/10 20:19, Payal wrote:
Hi,
I am trying to learn Python (again) and have some basic doubts which I
hope someone in the list can address. (English is not my first language and I
have no CS background except I can write decent shell scripts)
When I
On 06/04/10 11:56, John Bokma wrote:
Phlip phlip2...@gmail.com writes:
On Jun 3, 3:20 pm, geremy condra debat...@gmail.com wrote:
You mean like how I never get answers, to my super-easy GED-level
questions, here??!
I agree. This proves conclusively that a web forum is the right
place for
On 06/05/10 04:19, John Bokma wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
But the really sad thing is that you think that bigger automatically
equals better.
I don't think that was the point.
Anyway, not everbody can pick a provider, there are plenty of places
On 06/05/10 05:04, Emile van Sebille wrote:
On 6/4/2010 11:27 AM Terry Reedy said...
On 6/4/2010 12:28 PM, Emile van Sebille wrote:
Is there now a non-email method of posting to this list?
Google == comp.lang.python == python-list ==
gmane.comp.python.general
where == is a bi-directional
On 06/05/10 04:38, Magdoll wrote:
On Jun 4, 11:33 am, Peter Otten __pete...@web.de wrote:
kj wrote:
Task: given a list, produce a tally of all the distinct items in
the list (for some suitable notion of distinct).
Example: if the list is ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b',
'c', 'a'],
On 06/05/10 06:57, John Bokma wrote:
Lie Ryan lie.1...@gmail.com writes:
On 06/04/10 11:56, John Bokma wrote:
Phlip phlip2...@gmail.com writes:
On Jun 3, 3:20 pm, geremy condra debat...@gmail.com wrote:
You mean like how I never get answers, to my super-easy GED-level
questions, here
On 06/05/10 07:51, GZ wrote:
Hi Pat,
On Jun 4, 2:55 pm, Patrick Maupin pmau...@gmail.com wrote:
On Jun 3, 9:54 pm, GZ zyzhu2...@gmail.com wrote:
Hi All,
I am looking for an algorithm that can compare to source code files
line by line and find the minimum diff. I have looked at the
On 06/03/10 22:50, Adam Tauno Williams wrote:
On Thu, 2010-06-03 at 13:42 +0100, Paul Rudin wrote:
Adam Tauno Williams awill...@whitemice.org writes:
On Thu, 2010-06-03 at 12:35 +0100, Paul Rudin wrote:
Adam Tauno Williams awill...@whitemice.org writes:
Most people use this list via e-mail...
On 05/31/10 05:10, Colin J. Williams wrote:
On 30-May-10 01:50 AM, Nathan Rice wrote:
On 27-May-10 08:48 AM, Xavier Ho wrote:
On 27 May 2010 22:22, HHhenri...@gmail.com
mailto:henri...@gmail.com mailto:henri...@gmail.com
On 05/26/10 11:04, Bryan wrote:
Jean-Michel Pichavant wrote:
I still don't see how many positive integers less than n have digits
that sum up to m makes it a partition though if that what prttn
means. Surely because I miss the context.
A partition of a positive integer m is an unordered
On 05/26/10 01:09, Adam Tauno Williams wrote:
On Tue, 2010-05-25 at 18:49 +0500, Sandy Ydnas wrote:
Agree, reveres engineering is crucial issuer for programming
language
but every executable file can be cracked, for example by using
disassembler!!!
For each weapon there is antiweapon, so
On 05/23/10 04:49, Terry Reedy wrote:
On 5/21/2010 11:03 PM, Lie Ryan wrote:
On 05/22/10 04:47, Terry Reedy wrote:
On 5/21/2010 6:21 AM, Deep_Feelings wrote:
python is not a new programming language ,it has been there for the
last 15+ years or so ? right ?
however by having a look
On 05/22/10 04:47, Terry Reedy wrote:
On 5/21/2010 6:21 AM, Deep_Feelings wrote:
python is not a new programming language ,it has been there for the
last 15+ years or so ? right ?
however by having a look at this page
http://wiki.python.org/moin/Applications
i could not see many
On 05/15/10 11:56, Lawrence D'Oliveiro wrote:
In message 4bec2a9...@dnews.tpgi.com.au, Lie Ryan wrote:
On 05/13/10 22:41, Lawrence D'Oliveiro wrote:
In message mailman.2720.1273210637.23598.python-l...@python.org, Chris
Rebert wrote:
Also, please don't use semicolons in your code. It's bad
On 05/15/10 10:27, Adam Tauno Williams wrote:
I'm trying to process OpenStep plist files in Python. I have a parser
which works, but only for strict ASCII. However plist files may contain
accented characters - equivalent to ISO-8859-2 (I believe). For example
I read in the line:
handle =
On 05/16/10 00:12, Adam Tauno Williams wrote:
On Sat, 2010-05-15 at 20:30 +1000, Lie Ryan wrote:
On 05/15/10 10:27, Adam Tauno Williams wrote:
I'm trying to process OpenStep plist files in Python. I have a parser
which works, but only for strict ASCII. However plist files may contain
On 05/13/10 22:41, Lawrence D'Oliveiro wrote:
In message mailman.2720.1273210637.23598.python-l...@python.org, Chris
Rebert wrote:
Also, please don't use semicolons in your code. It's bad style.
Wonder why they’re allowed, then.
they're there for line continuation, e.g.:
a = 40; foo(a)
On 05/12/10 06:50, Patrick Maupin wrote:
On May 11, 5:34 am, Paul Boddie p...@boddie.org.uk wrote:
On 10 Mai, 20:36, Patrick Maupin pmau...@gmail.com wrote:
The fact is, I know the man would force me to pay for the chocolate, so in
some cases that enters into the equation and keeps me from
On 05/12/10 18:43, M. Bashir Al-Noimi wrote:
Hi All,
I'm still a newbie in Python (I started learn it yesterday) and I faced
a huge problem cuz python always crashes because of encoding issue!
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown
On 05/13/10 00:53, Patrick Maupin wrote:
On May 12, 2:19 am, Lie Ryan lie.1...@gmail.com wrote:
On 05/12/10 06:50, Patrick Maupin wrote:
On May 11, 5:34 am, Paul Boddie p...@boddie.org.uk wrote:
On 10 Mai, 20:36, Patrick Maupin pmau...@gmail.com wrote:
The fact is, I know the man would
On 05/13/10 03:42, Joel Koltner wrote:
Just curious... in Microsoft's Visual Studio (and I would presume some
other tools), for many languages (both interpreted and compiled!)
there's an edit and conitnue option that, when you hit a breakpoint,
allows you to modify a line of code before it's
On 05/11/10 20:24, Paul Boddie wrote:
On 10 Mai, 17:01, Patrick Maupin pmau...@gmail.com wrote:
I'll be charitable and assume the fact that you can make that
statement without apparent guile merely means that you haven't read
the post I was referring to:
On 05/12/10 05:25, Chris Rebert wrote:
On Tue, May 11, 2010 at 11:13 AM, Terry Reedy tjre...@udel.edu wrote:
On 5/11/2010 7:11 AM, Lawrence D'Oliveiro wrote:
In message7xvdavd4bq@ruckus.brouhaha.com, Paul Rubin wrote:
Python is a pragmatic language from an imperative tradition ...
I
On 05/12/10 07:02, Patrick Maupin wrote:
On May 11, 9:00 am, Paul Boddie p...@boddie.org.uk wrote:
On 11 Mai, 15:00, Lie Ryan lie.1...@gmail.com wrote:
Come on, 99% of the projects released under GPL did so because they
don't want to learn much about the law; they just need to release
On 05/09/10 19:18, Steven D'Aprano wrote:
On Sun, 09 May 2010 15:17:38 +1000, Lie Ryan wrote:
On 05/09/10 07:09, Günther Dietrich wrote:
Why not this way?
a = [[1,2,3,4], [5,6,7,8]]
for i in a:
for j in i:
print(j)
1
2
3
4
5
6
7
8
Too simple?
IMHO
On 05/09/10 10:05, Chris Rebert wrote:
Additionally, it makes no sense to call an *instance* method such as
f1() in a class context. Or in Java-speak: you can't call a non-static
method in a static context.
nitActually, in python it does make sense, with a caveat that you have
to provide the
On 05/09/10 07:09, Günther Dietrich wrote:
Why not this way?
a = [[1,2,3,4], [5,6,7,8]]
for i in a:
for j in i:
print(j)
1
2
3
4
5
6
7
8
Too simple?
IMHO that's more complex due to the nested loop, though I would
personally do it as:
a = [
On 05/06/10 14:40, Daneel Yaitskov wrote:
Hi,
Everybody knows class's __str__ and __repr__ can be used to get readable
user representation of an object.
But for simple classes or debug aims it is tediously to code these
methods. And Python has very powerful reflection. I believe
On 05/05/10 13:25, Scott wrote:
James,
Thanks for the comprehensive reply. I would like to post it to
comp.lang.python but the main file is 169 lines long and the file for
functions is 316 lines long. I'm thinking that is a little long for
this format. Maybe I can put them up on a basic web
On 05/04/10 07:57, Baz Walter wrote:
On 03/05/10 19:12, Grant Edwards wrote:
On 2010-05-03, Baz Walterbaz...@ftml.net wrote:
You requested something that wasn't possible. It failed. What do
you think should have happened?
path = '../abc.txt'
os.path.realpath(path) - OSError: [Errno 2]
On 05/02/10 10:58, Steven D'Aprano wrote:
And Python's object system
makes it that the argument to __getattr__ is always a string even though
there might be a valid variable that corresponds to it:
That is nothing to do with the object system, it is related to the
semantics of Python
On 05/02/10 10:58, Steven D'Aprano wrote:
On Sun, 02 May 2010 05:08:53 +1000, Lie Ryan wrote:
On 05/01/10 11:16, Steven D'Aprano wrote:
On Fri, 30 Apr 2010 12:34:34 -0400, D'Arcy J.M. Cain wrote:
In practice though, I think that's a difference that makes no
difference. It walks like
On 05/01/10 11:16, Steven D'Aprano wrote:
On Fri, 30 Apr 2010 12:34:34 -0400, D'Arcy J.M. Cain wrote:
In practice though, I think that's a difference that makes no difference.
It walks like an operator, it swims like an operator, and it quacks like
an operator.
Nope it's not. A
On 04/30/10 13:21, Steven D'Aprano wrote:
On Fri, 30 Apr 2010 05:41:26 +1000, Lie Ryan wrote:
On 04/29/10 20:40, Gregory Ewing wrote:
Lie Ryan wrote:
No, the implicit concatenation is there because Python didn't always
have triple quoted string. Nowadays it's an artifact and triple quoted
On 04/30/10 12:07, Alf P. Steinbach wrote:
On 30.04.2010 01:29, * Carl Banks:
On Apr 28, 11:16 am, Alf P. Steinbachal...@start.no wrote:
On 28.04.2010 18:54, * Lie Ryan:
Python have triple-quoted string when you want to include large amount
of text;
Yes, that's been mentioned umpteen
101 - 200 of 789 matches
Mail list logo