Re: Spell-checking Python source code

2007-09-09 Thread David
On 9/9/07, David <[EMAIL PROTECTED]> wrote: > > tokenize.tokenize( > > file.readline, > > processStrings > > ) > > > > How would you go about writing the output to a file? I mean, I would > > like to open the file at main level and pass a handle to the file to > > processStrings to writ

Re: Python syntax wart

2007-09-09 Thread TheFlyingDutchman
It may be that a language that doesn't have a statement terminator (which can be end-of-line) needs a statement continuation symbol. (Excluding languages like Lisp that have parentheses everywhere). -- http://mail.python.org/mailman/listinfo/python-list

Re: Modul (%) in python not like in C?

2007-09-09 Thread Arnaud Delobelle
On Sep 9, 10:06 pm, stef mientki <[EMAIL PROTECTED]> wrote: > J. Cliff Dyer wrote: > > Dotan Cohen wrote: > > >> FIrst of all, how is the % symbol (as in 70%6=4) called in English? > > >> Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or > >> the other in error? Is this a known g

Re: Modul (%) in python not like in C?

2007-09-09 Thread [EMAIL PROTECTED]
On Sep 9, 11:43?pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 10 Sep 2007 01:06:59 GMT, Bryan Olson <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > They also disagree about integer division. C rounds toward zero; > > Python rounds downward. > > > In C: -1

Re: help - error when trying to call super class method

2007-09-09 Thread Matt McCredie
> I am trying to extend list class to build a stack class -- see code below--- > but I got an error when I try to call len method from list class here.. why? > Thanks in advance! Jeff did a good job of answering your questions. I just wanted to note that your pop is broken, but that doesn't matter

Re: concise code (beginner)

2007-09-09 Thread Alex Martelli
bambam <[EMAIL PROTECTED]> wrote: > > O(n) to find the element you wish to remove and move over > > everything after it, > > Is that how lists are stored in cPython? It seems unlikely? So-called "lists" in Python are stored contiguously in memory (more like "vectors" in some other languages), so

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Paul Rubin
Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: > According to this , the family of > algorithms collectively described as "SHA-2" is by no means a definitive > successor to SHA-1. See : However, due to adva

Re: Symbolic Link

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, samwyse wrote: > A hard-link, OTOH, allows > direct access to the contents of a file, as long as it is on the same > filesystem. No extra steps are required, so the process runs a few > microseconds faster, and directory-level permissions can't get in the way. Har

Re: concise code (beginner)

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, bambam wrote: > Thank you, Don't top-post. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python syntax wart

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > Lawrence D'Oliveiro wrote: >> But then you can no longer use indentation to display the >> two-dimensional structure of the statement. > > How can a statement be two-dimensional? Like this (from C++ code, but the idea is the same):

Re: Python syntax wart

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > What's wrong with this: > > for Link in GetEachRecord( Then you're no longer showing the syntax structure in two dimensions. -- http://mail.python.org/mailman/listinfo/python-list

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Paul Rubin wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: >> > ... and it's to NSA's credit that SHA-1 held up for as long as it did. >> But they have no convincing proposal for a successor. That means the gap >> between the classified and non-classified s

Re: Spell-checking Python source code

2007-09-09 Thread Benjamin
On Sep 8, 4:04 pm, John Zenger <[EMAIL PROTECTED]> wrote: > To my horror, someone pointed out to me yesterday that a web app I > wrote has been prominently displaying a misspelled word. The word was > buried in my code. > > Is there a utility out there that will help spell-check literal > strings

Re: How to insert in a string @ a index

2007-09-09 Thread a.m.
Thanks guys for you help. I ended up doing this way (for the records)... t1 = "hello world hello. hello. \nwhy world hello" while indexhttp://mail.python.org/mailman/listinfo/python-list

Re: concise code (beginner)

2007-09-09 Thread bambam
I can try that, but I'm not sure that it will work. The problem is that devList is just a pointer to a list owned by someone else. Making devList point to a new list won't work: I need to make the parent list different. I could do this by adding an extra level of indirection, but I think at the ris

Re: MySQLdb: ValueError Something Stupid

2007-09-09 Thread Justin Ezequiel
On Sep 7, 10:39 pm, mcl <[EMAIL PROTECTED]> wrote: > On 7 Sep, 14:11, Carsten Haese <[EMAIL PROTECTED]> wrote: > > > > > On Fri, 2007-09-07 at 05:52 -0700, mcl wrote: > > > > ValueError: invalid literal for int(): 0- > > > > args = ('invalid literal for int(): 0-',) > > > > >

Re: Symbolic Link

2007-09-09 Thread samwyse
mosscliffe wrote: > On 22 Aug, 00:05, Ian Clark <[EMAIL PROTECTED]> wrote: >> >>>On Aug 19, 4:29 pm,mosscliffe<[EMAIL PROTECTED]> wrote: >>> The source file is in an area which python can see, but not the browser. I am trying to make a link in a browser friendly area so I can use it to

Re: concise code (beginner)

2007-09-09 Thread bambam
I'm testing a series of scripts. The scripts are testing a series of hardware devices. The scripts are a sequence of device commands. The scripts have sequence numbers. I am adding exception handling to the to the 'inner platform' that executes sequences. I am doing this because testing of error

Re: concise code (beginner)

2007-09-09 Thread bambam
> Removing from a list while you iterate will had quadratic performance Anecdote: I was doing a route-finding program for a railway ticketing system. My replacement explained to my boss that it couldn't be done: the problem was one of that class of problems that has no good optimum solution. M

Re: Modul (%) in python not like in C?

2007-09-09 Thread Bryan Olson
Dotan Cohen wrote: > FIrst of all, how is the % symbol (as in 70%6=4) called in English? The operator is usually called "mod". (The symbol is usually called "percent".) I reserve "modulo" for its usage in mathematics. 70 modulo 6 is an equivalence class containing infinitely many integers. In mat

Re: Modul (%) in python not like in C?

2007-09-09 Thread Bryan Olson
Dotan Cohen wrote: > On 10/09/2007, Bryan Olson <[EMAIL PROTECTED]> wrote: >> Not according to the C standard: >> >> When integers are divided, the result of the / operator is >> the algebraic quotient with any fractional part discarded.(87) >> If the quotient a/b is representable, t

Re: os.sep and os.path.sep

2007-09-09 Thread O.R.Senthil Kumaran
* billiejoex <[EMAIL PROTECTED]> [2007-09-09 08:48:38]: > >>> import os > >>> hasattr(os, 'sep') > True > >>> hasattr(os.path, 'sep') > True > > By chance I noticed it. > Are there differences (I think not...)? > IMHO, if there are no differences os.path.sep should be removed since > it may be co

Re: Reâ­: â¬M odulâ­ (%) â¬i n python not like in Câ­?â¬

2007-09-09 Thread Dotan Cohen
On 09/09/2007, Roy Smith <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > "Dotan Cohen" <[EMAIL PROTECTED]> wrote: > > > FIrst of all, how is the % symbol (as in 70%6=4) called in English? > > It's called "modulo", but most people pronounce it "mod". > > It's documented at http://doc

Re: Modul (%) in python not like in C?

2007-09-09 Thread Dotan Cohen
On 10/09/2007, Bryan Olson <[EMAIL PROTECTED]> wrote: > Not according to the C standard: > > When integers are divided, the result of the / operator is > the algebraic quotient with any fractional part discarded.(87) > If the quotient a/b is representable, the expression > (a/b)

Re: Modul (%) in python not like in C?

2007-09-09 Thread Bryan Olson
Arnau Sanchez wrote: >> Dotan Cohen wrote: >>> Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or >>> the other in error? Is this a known gotcha? I tried to google the >>> subject however one cannot google the symbol %. Thanks in advance. [...] > In fact, what you get in C depend

Re: Modul (%) in python not like in C?

2007-09-09 Thread Ricardo Aráoz
John Machin wrote: > On Sep 10, 8:05 am, Lee Harr <[EMAIL PROTECTED]> wrote: Python will always yield a number x = m%n such that 0 <= x < n, but Turbo C will always yield a number such that if x = m%n -x = -m%n. That is, since 111 % 10 = 1, -111 % 10 = -1. The two values will alway

Re: Modul (%) in python not like in C?

2007-09-09 Thread John Machin
On Sep 10, 8:05 am, Lee Harr <[EMAIL PROTECTED]> wrote: > >> Python will always yield a number x = m%n such that 0 <= x < n, but > >> Turbo C will always yield a number such that if x = m%n -x = -m%n. That > >> is, since 111 % 10 = 1, -111 % 10 = -1. The two values will always > >> differ by n (a

Re: Modul (%) in python not like in C?

2007-09-09 Thread Lee Harr
>> Python will always yield a number x = m%n such that 0 <= x < n, but >> Turbo C will always yield a number such that if x = m%n -x = -m%n. That >> is, since 111 % 10 = 1, -111 % 10 = -1. The two values will always >> differ by n (as used above). Maybe it is an order-of-operations thing...

Re: UnboundLocalError on global variable

2007-09-09 Thread GuillaumeC
> def processLogEntry(entry): # ADD THIS TO YOUR CODE global cmterID_ > >revision = int(entry.getRevision()) >commiter = str(entry.getAuthor()) >datetime = getTimeStamp(entry.getDate()) >message = str(entry.getMessage()) > >Commiter_[0] = cmterID_ //HERE's THE PROBLEM The r

Re: UnboundLocalError on global variable

2007-09-09 Thread GuillaumeC
> def processLogEntry(entry): # ADD THIS TO YOUR CODE global cmterID_ > >revision = int(entry.getRevision()) >commiter = str(entry.getAuthor()) >datetime = getTimeStamp(entry.getDate()) >message = str(entry.getMessage()) > >Commiter_[0] = cmterID_ //HERE's THE PROBLEM The r

Re: Modul (%) in python not like in C?

2007-09-09 Thread stef mientki
J. Cliff Dyer wrote: > Dotan Cohen wrote: > >> FIrst of all, how is the % symbol (as in 70%6=4) called in English? >> >> Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or >> the other in error? Is this a known gotcha? I tried to google the >> subject however one cannot google

Re: Python syntax wart

2007-09-09 Thread stef mientki
James Stroud wrote: > Lawrence D'Oliveiro wrote: > >> The one thing I don't like about Python syntax is using backslashes to >> continue lines. Yes, you can avoid them if you can include parentheses >> somehow, but this isn't always possible. >> >> Possible: >> >> if ( >> quittin

UnboundLocalError on global variable

2007-09-09 Thread Konstantinos Pachopoulos
Hi, i have a problem, the source of which is probably the fact, that i have not understood how to declare global variables - I use the Jython compiler, but i think this is a Python issue... First of all, i don not use any classes in this module. The problem is, that i declare and instantiate som

Setting stdout encoding

2007-09-09 Thread Fabio Zadrozny
Hi, Does someone know if there's a way to explicitly set the stdout/stderr/stdin encoding that python should use? What I'm trying to do is make python recognize that the Eclipse output accepts a different encoding (such as utf-8, cp1252, etc). More details on the problem can be found at: http://s

Re: Modul (%) in python not like in C?

2007-09-09 Thread [EMAIL PROTECTED]
On Sep 9, 2:15�pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > Dotan Cohen wrote: > > FIrst of all, how is the % symbol (as in 70%6=4) called in English? > > > Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or > > the other in error? Is this a known gotcha? I tried to google the

Re: Modul (%) in python not like in C?

2007-09-09 Thread Arnau Sanchez
J. Cliff Dyer escribió: > Dotan Cohen wrote: >> FIrst of all, how is the % symbol (as in 70%6=4) called in English? >> >> Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or >> the other in error? Is this a known gotcha? I tried to google the >> subject however one cannot google

Re: Modul (%) in python not like in C?

2007-09-09 Thread Arnaud Delobelle
On Sep 9, 8:15 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > Dotan Cohen wrote: > > FIrst of all, how is the % symbol (as in 70%6=4) called in English? > > > Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or > > the other in error? Is this a known gotcha? I tried to google the

Re: Python syntax wart

2007-09-09 Thread James Stroud
Lawrence D'Oliveiro wrote: > The one thing I don't like about Python syntax is using backslashes to > continue lines. Yes, you can avoid them if you can include parentheses > somehow, but this isn't always possible. > > Possible: > > if ( > quitting > and > len

Re: Modul (%) in python not like in C?

2007-09-09 Thread J. Cliff Dyer
Dotan Cohen wrote: > FIrst of all, how is the % symbol (as in 70%6=4) called in English? > > Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or > the other in error? Is this a known gotcha? I tried to google the > subject however one cannot google the symbol %. Thanks in advance.

Re: Class design (information hiding)

2007-09-09 Thread Gregor Horvath
Alex Martelli schrieb: > > Why, thanks for the pointer -- I'm particularly proud of having written > """ > The only really workable way to develop large software projects, just as > the only really workable way to run a large business, is a state of > controlled chaos. > """ Yes, indeed a good sa

Re��: ��Modul�� (%) ��in python not like in C��?

2007-09-09 Thread Roy Smith
In article‭ <[EMAIL PROTECTED]>,‬ ‭ "‬Dotan Cohen‭" <[EMAIL PROTECTED]> ‬wrote‭:‬ ‭> ‬FIrst of all‭, ‬how is the‭ % ‬symbol‭ (‬as in 70%6‭=‬4‭) ‬called in English‭?‬ It's called‭ "Ã

Modul (%) in python not like in C?

2007-09-09 Thread Dotan Cohen
FIrst of all, how is the % symbol (as in 70%6=4) called in English? Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or the other in error? Is this a known gotcha? I tried to google the subject however one cannot google the symbol %. Thanks in advance. Dotan Cohen http://what-is

Re: python 2.5 problems

2007-09-09 Thread O.R.Senthil Kumaran
> Finally deleted 2.2 and loaded 2.5 (see below), using Dont delete. Uninstall python 2.2 and additional modules if you have installed them. > So is there something not stable about ver 2.5 on XP ? Nothing like that. Python 2.5 works perfectly fine on Windows XP. Download from www.python.org

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Paul Rubin
Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: > > ... and it's to NSA's credit that SHA-1 held up for as long as it did. > But they have no convincing proposal for a successor. That means the gap > between the classified and non-classified state of the art has shrunk down > to insignificance. Th

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Paul Rubin
Bryan Olson <[EMAIL PROTECTED]> writes: > I haven't kept up. Has anyone exhibited a SHA-1 collision? I don't think anyone has shown an actual collision, but apparently there is now a known way to find them in around 2**63 operations. I don't know if it parallellizes as well as a brute force attac

python 2.5 problems

2007-09-09 Thread Brian
Finally deleted 2.2 and loaded 2.5 (see below), using the msi, on my XP partition. Having intermittent system crashes. Assumed a corrupt download, so deleted and did another download/install. Same problems. The associated DLLs when XP says that it must shut down the idle shell are not consiste

Re: Using s.sort([cmp[, key[, reverse]]]) to sort a list of objects based on a attribute

2007-09-09 Thread Alex Martelli
Stefan Arentz <[EMAIL PROTECTED]> wrote: > Miki <[EMAIL PROTECTED]> writes: > > > > steps.sort(key = lambda s: s.time) > > This is why attrgetter in the operator module was invented. > > from operator import attrgetter > > ... > > steps.sort(key=attrgettr("time")) > > Personally I prefer the a

Re: unexpected behavior: did i create a pointer?

2007-09-09 Thread Alex Martelli
Arnaud Delobelle <[EMAIL PROTECTED]> wrote: ... > > >>> def lower_list(L): > > > > ... for i, x in enumerate(L): > > ... L[i] = x.lower() > > ...>>> s = ['STRING'] > > >>> lower_list(s) > > >>> print s == ['string'] > > True > > > > >>> def lower_string(s): > > > > ... s = s.lowe

os.sep and os.path.sep

2007-09-09 Thread billiejoex
>>> import os >>> hasattr(os, 'sep') True >>> hasattr(os.path, 'sep') True By chance I noticed it. Are there differences (I think not...)? IMHO, if there are no differences os.path.sep should be removed since it may be confusing. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to insert in a string @ a index

2007-09-09 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi; > > I'm trying to insert XYZ before a keyword in a string. Then forget about it. Python's strings are immutable. (snip) > The python doesn't supports t1[keyword_index]="XYZhello" (string > object assignment is not supported). How do I get to this problem? Any >

Re: Organizing Code - Packages

2007-09-09 Thread Bruno Desthuilliers
xkenneth a écrit : > On Sep 7, 2:04 pm, Wildemar Wildenburger > <[EMAIL PROTECTED]> wrote: > >>Paul Rudin wrote: >> >>>xkenneth <[EMAIL PROTECTED]> writes: >> >Ah, yes, a couple of things: >- avoid the 'one-class-per-file' syndrom. It's perfectly ok to have tens Yes but i find it

Re: Organizing Code - Packages

2007-09-09 Thread Bruno Desthuilliers
xkenneth a écrit : >>Ah, yes, a couple of things: >>- avoid the 'one-class-per-file' syndrom. It's perfectly ok to have tens > > > Yes but i find it hard to edit classes easily when I have more than > one class per file. Why so ? Could it be that your classes are growing too fat ? -- http://mai

Re: Spell-checking Python source code

2007-09-09 Thread David
> tokenize.tokenize( > file.readline, > processStrings > ) > > How would you go about writing the output to a file? I mean, I would > like to open the file at main level and pass a handle to the file to > processStrings to write to it, finally close output file at main level. > Probably

Re: unexpected behavior: did i create a pointer?

2007-09-09 Thread Arnaud Delobelle
On Sep 9, 1:59 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 09 Sep 2007 02:30:00 -0700, Arnaud Delobelle wrote: > >> You know, maybe because I came to Python with no C experience, I never > >> had trouble with the "unexpected behaviour" that so confused the > >> origi

HDR and PIL

2007-09-09 Thread bpowah
I've put together a method (and a script) for rendering (tone mapping) an arbitrary number of exposures into an HDR-style image. I really like the results I'm getting and feel like others could benefit from it. I've put together a small write-up here (with the code): http://bpowah.googlepages.c

Re: Organizing Code - Packages

2007-09-09 Thread GuillaumeC
On Sep 9, 1:04 am, xkenneth <[EMAIL PROTECTED]> wrote: > On Sep 8, 3:35 pm, David <[EMAIL PROTECTED]> wrote: > > > > How do import statements that are declared at the top of a python > > > module work? > > >http://docs.python.org/tut/node8.html > On Sat, 08 Sep 2007 12:42:19 -0700, xkenneth wrote:

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Steven D'Aprano
On Sun, 09 Sep 2007 18:53:32 +1200, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Paul Rubin wrote: > >> Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: >> >>> Except that the NSA's reputation has taken a dent since they failed to >>> anticipate the attacks on MD5 and SHA-1. >> >>

Re: unexpected behavior: did i create a pointer?

2007-09-09 Thread Steven D'Aprano
On Sun, 09 Sep 2007 02:30:00 -0700, Arnaud Delobelle wrote: >> You know, maybe because I came to Python with no C experience, I never >> had trouble with the "unexpected behaviour" that so confused the >> original poster. It's just obvious. > > The funny thing is that if the OP had thought of bot

Re: Python syntax wart

2007-09-09 Thread Wildemar Wildenburger
Steven D'Aprano wrote: > That is quite possibly the ugliest piece of code I've ever seen in > Python. I'm impressed. Did you format it yourself or did you use a > professionally written code-uglifier? > Boy did that make me laugh! The notion of a "code uglifier" just is a pearl. (I hate to call

[OT] Re: So what exactly is a complex number?

2007-09-09 Thread Grzegorz Słodkowicz
>> Interesting. It appears that we are ran into a mathematical >> cultural difference. Were I come from vectors *are* defined as >> having four properties that I enumerated. After some research I >> found that English sources (Wikipedia) indeed give the definition >> you supplied. >> > Indee

Re: Python syntax wart

2007-09-09 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: > But then you can no longer use indentation to display the > two-dimensional structure of the statement. How can a statement be two-dimensional? Like a two-dimensional Turing Machine? Regards, Björn -- BOFH excuse #156: Zombie processes haunting the computer --

Re: Python syntax wart

2007-09-09 Thread Stefan Behnel
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Stefan Behnel wrote: > >> He means he has to use backslashes instead of parentheses here. >> >> Which is not true, you could easily rephrase this as: >> >> for link in GetEachRecord( >> "links", >> ): >>

Re: Python syntax wart

2007-09-09 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: > >> The one thing I don't like about Python syntax is using backslashes to >> continue lines. > > Then don't use them. Put everything in one long line. > > Or do something like this. Ins

Re: Python syntax wart

2007-09-09 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: > Not possible: > > for \ > Link \ > in \ > GetEachRecord \ > ( > "links", > ("from_episode",), > "to_episode = %s", > [EpisodeID], > "order by when_created" > ) \ >

Re: unexpected behavior: did i create a pointer?

2007-09-09 Thread Arnaud Delobelle
On Sep 8, 10:44 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: [...] > Ways that Python objects are like pointers: > > (1) ... um... > > Oh yeah, if you bind the _same_ object to two different names, _and_ the > object is mutable (but not if it is immutable), mutating the object

Re: Using s.sort([cmp[, key[, reverse]]]) to sort a list of objects based on a attribute

2007-09-09 Thread Stefan Arentz
Miki <[EMAIL PROTECTED]> writes: > > steps.sort(key = lambda s: s.time) > This is why attrgetter in the operator module was invented. > from operator import attrgetter > ... > steps.sort(key=attrgettr("time")) Personally I prefer the anonymous function over attrgettr :) S. -- http://mail.pyt

Re: Python syntax wart

2007-09-09 Thread Steven D'Aprano
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: > The one thing I don't like about Python syntax is using backslashes to > continue lines. Then don't use them. Put everything in one long line. Or do something like this. Instead of for Link in GetEachRecord("lots", "and", "lots",

Re: Python syntax wart

2007-09-09 Thread Carl Banks
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: > The one thing I don't like about Python syntax is using backslashes to > continue lines. Yes, you can avoid them if you can include parentheses > somehow, but this isn't always possible. > > Possible: > > if ( > qui

re: getting the current function

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Gary Robinson wrote: > I've just never liked the fact that you have to name the function when > accessing those attributes from within the function. If it's any consolation, it's not actually the function name you need to refer to, merely any variable or Python obj

Re: pdb question - spew out "steps" until crash needed

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Paul Rubin wrote: > However, the malloc problem has probably already screwed things up > long before the application actually freezes. Your best bet is > to recompile Python with malloc debugging enabled and/or run Python > itself under a debugger. A simple thing