Re: merits of Lisp vs Python

2006-12-08 Thread Paddy
Lisp has a role to play, but maybe a language tuned to research and with its user base would naturally find it hard to compete in the roles in which dynamic languages such as Python are strongest. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-08 Thread Paddy
s. Maybe Lisp is to science, as Python is to engineering - with a slight blurring round the edges? - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: I think Python is a OO and lite version of matlab

2006-12-08 Thread Paddy
Allen wrote: > Does anyone agree with me? > If you have used Matlab, welcome to discuss it. I'm sorry Allen, but Python is heading on the long road to being Lisp. Matlab will have to wait its turn ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-09 Thread Paddy
uage of the wrapped library. The library itself may be better used in the dynamic environment of Pythons command line; or used together with other libraries already wrapped for/accessible from Python. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-09 Thread Paddy
our weapons... Amongst our weaponry... ...Are such elements as fear, surprise I'll come in again. Python is fun to use. Easy to read. Simple and powerful. Easy to test. Easy to maintain. Fast. Very fast! - Paddy. . -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-10 Thread Paddy
ctest-like module as part of its standard distribution? Or are you saying that If you ever needed it, then it would be trivial to implement in Lisp, and you would 'roll your own'? There are advantages to doctest being one of Pythons standard modules. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-11 Thread Paddy
On Dec 11, 8:07 am, "Kaz Kylheku" <[EMAIL PROTECTED]> wrote: > Paddy wrote: > > http://en.wikipedia.org/wiki/DoctestI pity the hoplelessly > > anti-intellectual douche-bag who inflicted this > undergraduate misfeature upon the programming language. Oh wow! S

Re: merits of Lisp vs Python

2006-12-11 Thread Paddy
On Dec 11, 2:17 pm, Bill Atkins <[EMAIL PROTECTED]> wrote: > "Paddy" <[EMAIL PROTECTED]> writes: > > [EMAIL PROTECTED] wrote: > > >> > Python has to rely more on using the right algorithm... > > >> This sound familiar: "Macros are

Re: One module per class, bad idea?

2006-12-12 Thread Paddy
practice diverge from Pythons. You might try looking at the source to some of the standard modules to see how things are done in Python. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: One module per class, bad idea?

2006-12-12 Thread Paddy
se modules and can decide for yourself. As others have noted, people might not consider it good style if you put lots of related, very small, classes in individual files. You can, but it is not mandated by the interpreter. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
t is worth, even if it saves you a > > tiny bit of thought when pasting code. > > Of course, you use prefix notation all the time in Python: > > for x in range(0,len(y)): > dosomething(x) In Python, most containers are directly iterable so we are much more likely to arra

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
Jesús Carrete Montaña wrote: > > Fast. Very fast! > > > > - Paddy. > > > Well, Python certainly is faster than most people doing floating-point > arithmetic by hand, but I don't think this is the correct argument to use > against Lisp :-P. Why not! Lisp

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
Paul Rubin wrote: > "Paddy" <[EMAIL PROTECTED]> writes: > > Python can be used as a glue language. It is not solely a glue > > language. > > A lot of people find using Python to script libraries written in other > > languages > > a way to get thin

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
o program. I make it easier for them to find Python by helping to maintain Python within Wikipedia. If I am researching anything then I like to cross check with information from multiple sites. that's just good practice. Some people dislike Wikipedia which is fine. Some people dislike Wikipedia and deliberately sabotage it, which is vandalism. -Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-12 Thread Paddy
John Thingstad wrote: > On Wed, 13 Dec 2006 01:54:58 +0100, Paddy <[EMAIL PROTECTED]> wrote: > > > > > Robert Uhl wrote: > > > >> Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> > > >> > Speaking as somebody who pr

Re: merits of Lisp vs Python

2006-12-13 Thread Paddy
On Dec 13, 8:39 am, [EMAIL PROTECTED] (Timofei Shatrov) wrote: > On 12 Dec 2006 18:03:49 -0800, "Paddy" <[EMAIL PROTECTED]> tried to confuse > everyone with this message: > > >There are a lot of people that use Wikipedia. I think some of them > >might wa

Re: merits of Lisp vs Python

2006-12-13 Thread Paddy
Ken Tilton wrote: > (apologies for nasty formatting): ;-) - Paddy! -- http://mail.python.org/mailman/listinfo/python-list

Re: Survey environment for Python?

2006-12-14 Thread Paddy
On Dec 14, 9:12 am, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: > exhuma.twn schrieb: > > > Hi, > > > Just recently I had to take over support for legacy software written in > > Blaise (www.cbs.nl).I don't understand the meaning of the link. Do you mean > > this language? > > http://blaise.sourcef

Re: automatically grading small programming assignments

2006-12-14 Thread Paddy
submit until they get it, > logging > each attempt. > > Or perhaps there is a better way to do this sort of thing. How do others who > teach > Python handle this? > It might turn out to be a poor substitute for the personal touch, especially If they are just starting to program. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: automatically grading small programming assignments

2006-12-14 Thread Paddy
nt > authentication, that's not a problem. Setting up a Crunchy server in a virtualized OS environment would give you some security. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: OT : Bug/Issue tracking systems

2006-12-17 Thread Paddy
lable with tools like mercurial http://blog.arabx.com.au/?p=254, http://www.selenic.com/mercurial/wiki/index.cgi, http://www.opensolaris.org/os/community/tools/scm/ http://video.google.co.uk/videoplay?docid=-7724296011317502612&q=mercurial At work we pay for clearcase and it does the revision control job very well, but in another company that were using CVS or RCS I would re-evaluate the source control needs. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Metaclass uses?

2006-12-17 Thread Paddy
ons/CheckedExceptions - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression

2006-12-18 Thread Paddy
Asper Faner wrote: > I seem to always have hard time understaing how this regular expression > works, especially how on earth do people bring it up as part of > computer programming language. Natural language processing seems not > enough to explain by the way. Why no eliminate it ? If you try to

Re: One module per class, bad idea?

2006-12-22 Thread Paddy
Carl Banks wrote: > Erik Johnson wrote: > > The file has now grown into a 6800 line beast (including docstring, > > whitespace, and CVS history). Pretty much any time we implement some new > > functionality, there are at least a few changes in that file. When you have > > multiple developers

Re: Anyone persuaded by "merits of Lisp vs Python"?

2006-12-29 Thread Paddy
Carl Banks wrote: > If you were so keen on avoiding a flame war, the first thing you should > have done is to not cross-post this. I want to cover Pythonistas looking at Lisp and Lispers looking at Python because of the thread. The cross posting is not as flame bait. - Paddy. --

Re: OO question

2006-12-31 Thread Paddy
, with a method like writetofile(filename), or should the class > AddressBook take care of the saving and ask each object for its data? If you use the pickle module on the Addressbook then it will automatically save each Address instance. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: OO question

2006-12-31 Thread Paddy
Steven D'Aprano wrote: > On Sun, 31 Dec 2006 19:47:12 -0800, fejkadress wrote: > > > I want to make an addressbook and I'm new to OO programming, so I > > wonder if this sounds reasonable. > > > > I think of making a class Address which contains all data about one > > person, that class can have

Re: OO question

2007-01-01 Thread Paddy
Steven D'Aprano wrote: > On Sun, 31 Dec 2006 22:00:58 -0800, Paddy wrote: > > >> def save(self, filename): > >> self.currentfile = file(filename, "w") > >> for address in self.addresses: >

Re: What is proper way to require a method to be overridden?

2007-01-04 Thread Paddy
ss is sub-classed, what is to stop the lazy sub-classer from doing the equivalent of: define override_me(self, ...): pass And so get code through the compiler,, allowing them to 'meet their targets'? - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: C/C++, Perl, etc. to Python converter

2007-01-05 Thread Paddy
rnet. But a converter? Try this page: http://wiki.python.org/moin/PerlPhrasebook - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python re expr from Perl to Python

2007-01-06 Thread Paddy
''.join(g[1])) for g in groupby(na, lambda c: c not in ' \t|[]')] [(True, 'Abc'), (False, ' | '), (True, 'def'), (False, ' | '), (True, 'ghi'), (False, ' | '), (True, 'jkl'), (False, ' ['), (True, &

Re: Python re expr from Perl to Python

2007-01-06 Thread Paddy
Paddy wrote: > Michael M. wrote: > > > In Perl, it was: > > > > > >## Example: "Abc | def | ghi | jkl" > >## -> "Abc ghi jkl" > >## Take only the text betewwn the 2nd pipe (=cut the text in the 1st > > pipe

Colons, indentation and reformatting.

2007-01-08 Thread Paddy
tle, it seems that a colon followed by non-indented code that has just been pasted in could also be used by a Python-aware editor as a flag to re-indent the pasted code. Tell me it is not so, or I will be editing the Wikipedia page I think. And if it is true then do we need to update the FAQ?

Colons, indentation and reformatting. (2)

2007-01-08 Thread Paddy
owed by non-indented code that has just been pasted in could also be used by a Python-aware editor as a flag to re-indent the pasted code. Tell me it is not so, or I will be editing the Wikipedia page I think. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: re.sub and re.MULTILINE

2007-01-08 Thread Paddy
't. No replacement: > >>> re.sub("^foo", "bar", "\nfoo", re.MULTILINE) > '\nfoo' > > Why? > > Thanks, > nyenyec Check the arguments to re.sub. >>> re.sub('(?m)^foo', 'bar', '\nfoo', count=0) '\nbar' - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Colons, indentation and reformatting. (2)

2007-01-08 Thread Paddy
[EMAIL PROTECTED] wrote: > Paddy wrote: > > I was just perusing a Wikipedia entry on the "off side rule" at > > http://en.wikipedia.org/wiki/Off-side_rule . > > It says that the colon in Python is purely for readability, and cites > > our FAQ entry > >

Re: Colons, indentation and reformatting. (2)

2007-01-08 Thread Paddy
Paul McGuire wrote: > "Paddy" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >I was just perusing a Wikipedia entry on the "off side rule" at > > http://en.wikipedia.org/wiki/Off-side_rule . > > It says that the colon in Pytho

Re: Colons, indentation and reformatting. (2)

2007-01-09 Thread Paddy
OK, whilst colons are not sufficient to re-format a completely mis-indented file. I'm thinking that they are sufficient for reformatting most pasted code blocks when refactoring say? - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehention

2006-01-24 Thread Paddy
' for further copyright information. >>> ref = [3, 3, 1, 1, 3] >>> lst=[5, 1, 4, 5, 3] >>> answer = len([ val for val in set(ref) for x in range(min(lst.count(val), >>> ref.count(val)))]) >>> answer 2 >>> - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: beta.python.org content

2006-01-26 Thread Paddy
, Mac, MFC, wxWidgets) * extensions and modules easily written in C, C++ or Python * embeddable within applications needing a scripting interface - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Builder Pattern

2006-01-29 Thread Paddy
> What the following discussion says is that the C++ -> Python > transliteration is totally trivial and obvious and berates the original > requestor for making me waste 10 minutes to provide it. Thanks for the giggle :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you pronounce 'tuple'?

2006-02-13 Thread Paddy
Its tupple surely. The following shows that we are not the first to ponder this: http://www.jot.fm/issues/issue_2003_03/column9 Stick tuple into the Windosw XP speech properties preview box and hit preview-voice, it says tupple not toople. :-) - Paddy. -- http://mail.python.org/mailman

Re: how do you pronounce 'tuple'?

2006-02-14 Thread Paddy
Hmm, I've found a term for a large tuple, a muckle: http://www.google.co.uk/search?hl=en&q=define%3Amuckle&btnG=Search&meta= Definitions of muckle on the Web: * batch: (often followed by `of') a large number or amount or extent; "a batch of letters"; "a deal of trouble"; "a lot of money"; "

Re: how do you pronounce 'tuple'?

2006-02-14 Thread Paddy
(dupple, supple, zupple) = (2,1,0) # :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: how do you pronounce 'tuple'?

2006-02-15 Thread Paddy
So thats were its from. My Parents used to quote it to me when I were a 'wee lad', So they read Burns -Pad. -- http://mail.python.org/mailman/listinfo/python-list

Re: Shared memory

2006-03-02 Thread Paddy
Pylinda ? http://www-users.cs.york.ac.uk/~aw/pylinda/ -- http://mail.python.org/mailman/listinfo/python-list

XP rich text cut-n-paste

2006-03-04 Thread Paddy
menu just allows the pasting of un-adorned text. i have a work-around: gvim coourizes and allows export as html, but it is long-winded. Thanks in advance, Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: XP rich text cut-n-paste

2006-03-04 Thread Paddy
authorized so I can make a donation). - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: any macro-like construct/technique/trick?

2005-06-03 Thread Paddy
but not for running them. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: PythonS?

2007-06-09 Thread Paddy
ites/1473/Python.jpg > > The fact of adding a "S" could constitute a PEP. > for classification, I propose: PEP'S > > -- > @-salutations > > Michel Claveau I'd vote for a more serpentine Python :-) - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Link Dictionary

2007-06-11 Thread Paddy
x27;: '2', 'D3': '8', > > > 'B4': '3', 'B5': '0', 'B6': '5', 'B7': '0', 'E9': '8', 'B1': '9', > > > 'B2': '0',

Re: Link Dictionary

2007-06-11 Thread Paddy
> > dout = [[dict2[i],[dict2[k] for k in j]] > for i,j in data] > print dout > > - Paddy. Working from your original dict1: dout = [[dict2[i], [dict2[k] for k in setvalue]] for i,setvalue in dict1.iteritems()] - Paddy -- http://mail.python.org/mailman/listinfo/python-list

Re: for ... else ?

2007-06-12 Thread Paddy
g two new keywords for essencially the same thing > would be too much... Anyway it's too late to be changed now. > > -- > Gabriel Genellina Hmmm, Would replacing the word 'else' with 'then' read better? The implied meaning is if the loop terminates normally *then* also do this block. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-20 Thread Paddy
the dynamism of names and the reliance on tests and coverage over static type checking. As you state that you are new to Python, why not try the Python way; gain proficiency; then think again about the issue. If you are still of like mind then your proficiency should enable you to give more convincing reasons to the ccommunity. - Paddy. It would need support. Are you volunteering effort? -- http://mail.python.org/mailman/listinfo/python-list

Re: Packing a simple dictionary into a string - extending struct?

2007-06-20 Thread Paddy
x27; -http://en.wikipedia.org/wiki/Binary_XML.) > > So, what I'm looking for is something like and extension of struct that > allows dictionaries to be stored. Does anyone know of any related work? > > -- > Jonathan Fine You could use YAML or KSON then compress the output if size is an issue. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-20 Thread Paddy
been debated before but I haven't looked - send me a link. I know this might start a flame war, but I'll ask anyway. And sure enough, you then goad a regular *contributor* to comp.lang.python . I suggest you rephrase your question in a less confrontational tone but only if you

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-20 Thread Paddy
MAIL PROTECTED] > Cell: +(617) 308-5571http://laniels.org/ > PGP key:http://laniels.org/slaniel.key have you seen language Boo? It adds static typing to Python inspired syntax: http://boo.codehaus.org/ - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Collections of non-arbitrary objects ?

2007-06-23 Thread Paddy
dvice that may be contrary to intuition? Unfortunately its how we usually do things in Python and do NOT suffer because of it. Try writing your application without it. Test without it. Write other applications without it. Others do, successfully. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Collections of non-arbitrary objects ?

2007-06-23 Thread Paddy
then only stuff the list with data expected by the routine. If you don't then Python will most likely throw a runtime exception, but it is up to you to trust your co-workers on the project. - Paddy -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-30 Thread Paddy
e fees. How many of those cancelled UK government software projects that cost me hundreds of millions of pounds were programmed by people espousing the greater safety of their static typing? - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: need a variation algorithm for Lists in Dictionaries

2007-07-04 Thread Paddy
uot;"" I need to get a list of strings that render all possible variants, > this is what my output should be based on the > x dictionary: > abd > abe > abf > acd > ace > acf > acg > bbd > bbe > bbf > bcd > bce > bcf > bcg > > ""&

Re: New release: Crunchy 0.9

2007-07-12 Thread Paddy
e many > python-aware IDEs. > > 10. Crunchy includes a fairly comprehensive tutorial on its own use, > as well as a reference for tutorial writers that want to make their > tutorials "crunchy-friendlier". > > 11. As a security feature, crunchy strips all pre-existing javascr

Re: Can a low-level programmer learn OOP?

2007-07-15 Thread Paddy
lution. Have you also tried looking for a cross-platform GUI program that has a scripting interface that you might adapt? If found then the extra scripting needs may be reduced. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: In a dynamic language, why % operator asks user for type info?

2007-07-16 Thread Paddy
s the case, we could've avoided all those exceptions > that happen when a %d is specified but say a string is passed. > > Thanks, > Karthik '%s' might be what your after as a more 'general purpose' moifier. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: dejagnu equivalent

2007-07-21 Thread Paddy
On Jul 18, 7:05 am, "Rustom Mody" <[EMAIL PROTECTED]> wrote: > Does anyone know if a dejagnu equivalent exists for python? > [Dejagnu is in tcl] Maybe http://www.codesourcery.com/public/qmtest/whitepaper.pdf ? I have not used it though. -- http://mail.python.org/mailman/listinfo/python-list

Re: Better dict of dicts

2007-04-19 Thread Paddy
> a,b=TTT(),TTT() > > Then the follow comparisons are fast: > (1,2,3)==(1,2,3) > (1,2,3,a)==(1,2,3,a) > (0,0,0,a)==(1,2,3,b) > > The following are slow: > (1,2,3,a)==(1,2,3,b) > > Note that the only slow case is the one where a.__eq__(b) is called. However, > a.__eq__(b) is assumed True is "a is b" is True. So chances are you'll want > to comment out the __eq__ function. Hi DillonCo, Martins earlier local_intern function would work for tuples as well as strings. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: List of Objects

2007-04-19 Thread Paddy
random.randint(deltaxmin, deltaxmax), g.pos[1] + random.randint(deltaymin, deltaymax) ) The above is untested by the way. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: python style guide inconsistencies

2007-04-23 Thread Paddy
p to date? Is this the right place to point out that one of > those pages needs to be updated? > > Thanks, > Darren In addition to the other replies on your direct question, it is also not a good idea to have modules whose names only differ by case. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Advocacy: "Python up, Ruby down".

2007-04-24 Thread Paddy
balance between fixing what we have over adding new features is hard, but it did pay off for this programmer who was lured over by a more robust implementation and good documentation. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: webbrowser.open works in IDLE and cmd shell but not from cygwin prompt

2007-04-26 Thread Paddy
__ > raise ValueError("close_fds is not supported on Windows " > ValueError: close_fds is not supported on Windows platforms > > What's up with that? And, more to the point, how can I use webbrowser > from scripts launched under cygwin? I have X and kde for cygwin ins

Off Topic: Is the use of supererogatory supererogatory?

2007-05-13 Thread Paddy
it may have been for a fee or a favour). Supererogatory, my word of the day. - Paddy P.S; http://www.chambersharrap.co.uk/chambers/features/chref/chref.py/main?query=supererogatory+&title=21st -- http://mail.python.org/mailman/listinfo/python-list

Re: converting strings to most their efficient types '1' --> 1, 'A' ---> 'A', '1.2'---> 1.2

2007-05-18 Thread Paddy
s issue? > > Thanks, > Conor You might try investigating what can generate your data. With luck, it could turn out that the data generator is methodical and column data-types are consistent and easily determined by testing the first or second row. At worst, you will get to know how much you must check for human errors. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Typed named groups in regular expression

2007-05-18 Thread Paddy
n the name of a type conversion function to all group names, and creating a function to apply the type convertion function to all named groups of a match object. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: python shell

2007-05-18 Thread Paddy
shell. Any incite would be useful. Doctest! http://en.wikipedia.org/wiki/Doctest http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305292 - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to choose between python and java

2007-05-18 Thread Paddy
r: It might be. Long answer: There are a lot of active libraries and frameworks out their that attack common speed problems. For example numpy allows C-type speeds of execution of some numerical applications. Note its not fast if it is wrong, and Python may allow you to tune your algorithm with mor

Re: Start

2007-05-19 Thread Paddy
On May 19, 4:18 pm, Nautilus <[EMAIL PROTECTED]> wrote: > Can anybody halp me start using Python. http://wiki.python.org/moin/BeginnersGuide And welcome :-) - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Typed named groups in regular expression

2007-05-20 Thread Paddy
On May 20, 2:27 am, "Hugo Ferreira" <[EMAIL PROTECTED]> wrote: > Both Paddy (hackish) and McGuire (right tool for the job) ideas sound > very interesting ;-) I'll definitely research on them further. > > Thanks for the support... Hackis, hackISH! Sir, I would have

Re: python shell/Intermediate Python tools.

2007-05-20 Thread Paddy
On May 20, 1:56 am, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>,Paddy <[EMAIL PROTECTED]> wrote: > >On May 16, 6:38 pm, Krypto <[EMAIL PROTECTED]> wrote: > >> I have been using python shell to test small parts of the big program

Re: converting strings to most their efficient types '1' --> 1, 'A' ---> 'A', '1.2'---> 1.2

2007-05-20 Thread Paddy
On May 20, 2:16 am, John Machin <[EMAIL PROTECTED]> wrote: > On 19/05/2007 3:14 PM, Paddy wrote: > > > > > On May 19, 12:07 am, py_genetic <[EMAIL PROTECTED]> wrote: > >> Hello, > > >> I'm importing large text files of data using csv. I

Re: converting strings to most their efficient types '1' --> 1, 'A' ---> 'A', '1.2'---> 1.2

2007-05-20 Thread Paddy
On May 20, 1:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > On 20/05/2007 8:52 PM, Paddy wrote: > > > > > On May 20, 2:16 am, John Machin <[EMAIL PROTECTED]> wrote: > >> On 19/05/2007 3:14 PM, Paddy wrote: > > >>> On May 19, 12:07 am, py_genet

Re: Python-URL! - weekly Python news and links (May 21)

2007-05-21 Thread Paddy
might have > imagined: > > http://groups.google.com/group/comp.lang.python/browse_thread/thread/... ... But you need to check Christopher Arndt's immediate reply to John for the corrections! - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: From D

2007-07-25 Thread Paddy
On Jul 25, 1:47 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 24 Jul 2007 11:10:53 -0300, Stargaming <[EMAIL PROTECTED]> > escribió: > > > On Tue, 24 Jul 2007 03:19:53 -0700, bearophileHUGS wrote: > > >> There are various things I like about the D language that I think Python > >> to

Re: removing items from a dictionary ?

2007-07-28 Thread Paddy
's > post? He already knows that you delete items from a dictionary with del, > and he posted code and the traceback he gets when he runs it. > > -- > Steven. ... But lets also applaud the fact that MartyW wants to help. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing Dictionaries

2007-07-28 Thread Paddy
Hi Kenneth, being new to Python i wondered if you at least considered Doctests as part of your testing solution. Other languages don't have Doctest. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing Dictionaries

2007-07-30 Thread Paddy
On Jul 30, 8:30 pm, Kenneth Love <[EMAIL PROTECTED]> wrote: > At 03:23 AM 7/28/2007, you wrote: > > >Hi Kenneth, being new to Python i wondered if you at least considered > >Doctests as part of your testing solution. > >Other languages don't have Doctest. >

Re: (no) fast boolean evaluation ?

2007-08-04 Thread Paddy
True True : f(x)=True g(x)=True True True False : f(x)=True g(x)=False False False True : f(x)=False False False False : f(x)=False False Short circuit defeated True True : f(x)=True g(x)=True True True False : f(x)=True g(x)=False False False True : f(x)=False g(x)=True False False False : f(x)=False g(x)=False False - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: (no) fast boolean evaluation ?

2007-08-04 Thread Paddy
On Aug 4, 4:18 pm, Paddy <[EMAIL PROTECTED]> wrote: > On Aug 2, 10:47 pm, Stef Mientki <[EMAIL PROTECTED]> > wrote: > > > hello, > > > I discovered that boolean evaluation in Python is done "fast" > > (as soon as the condition is ok, the rest o

Re: sqlite3 create table col width?

2007-08-04 Thread Paddy
ven using varchar(0) defaults to 10 spaces. > > I would appreciae the help if someone could tell > me what I'm missing, I want to varry the column > sizes. > > jim-on-linux Hi Jim, You need to create a new thread for this new question so it gets maximum visibility and so is

Re: (no) fast boolean evaluation ?

2007-08-05 Thread Paddy
On Aug 4, 5:33 pm, Paddy <[EMAIL PROTECTED]> wrote: > On Aug 4, 4:18 pm, Paddy <[EMAIL PROTECTED]> wrote: > > > > > On Aug 2, 10:47 pm, Stef Mientki <[EMAIL PROTECTED]> > > wrote: > > > > hello, > > > > I discovered that boolean e

Doctest in Python implementations

2007-08-08 Thread Paddy
Hi, I'm wanting to update the Wikipedia entry on doctest with information on which current python implementations support the doctest module. So, does Doctest come with ironpython, jython, python for Nokia phones (what is that called)? Thanks. -- http://mail.python.org/mailman/listinfo/python-li

Re: This bit of code hangs Python Indefinitely

2007-08-08 Thread Paddy
> You could possibly make a case that before Queue.put blocks it should check > whether the program has more than just the one thread and if not it should > raise an RTFMException. Cute :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Complexity of methods etc

2007-08-12 Thread Paddy
diomatic/handout.html Although I don't think algorithm complexity is given, it is telling you how to select the most efficient way of doing things in a number of examples. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary viewer and editor

2007-08-13 Thread Paddy
On Aug 13, 7:09 pm, Ariel Balter <[EMAIL PROTECTED]> wrote: > http://mail.python.org/pipermail/python-list/2001-August/100288.html > > Did you ever finish writing this? > > -- > <>0<>0<>0<>0<>0<>0<>0<>0<>0<>0 > > Ariel Balter > > Swain Hall West 025 > Department of Physics > Indiana University, Blo

Re: Dictionary viewer and editor

2007-08-13 Thread Paddy
bugs > shallow'}]}}, default_flow_style=False ) > > ... is ... > > alpha: 1 > beta: 2 > otherstuff: > bug: null > cool: true > foo: > - bar > - !!float '2e+64' > - 13: many eyes > 14: make all > 15: bugs shallow I thought he wanted something graphical, but if text will do there is the PrettyPrint module... - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Naming dictionaries recursively

2007-08-17 Thread Paddy
7;name' : 'Bob', 'species' : 'Humboldt', 'colour' : 'red', 'habits' : 'predatory'}, { ... }, ... } You can then name the file with a .py ending and import it as a list of dictionaries that you can then process to form a dict

Re: Naming dictionaries recursively

2007-08-18 Thread Paddy
en you could use tuples as dictionary keys as shown below: import modulename datadict = dict( ((data2name(d), count), d) for count,d in enumerate(modulename.data) ) Generally, if you try and create two keys with the same name in a dictionary, they will clash and only the second v

Python hash

2007-08-18 Thread Paddy
: 8})})}) >>> """ def __init__(self, *a, **b): defaultdict.__init__(self, hash, *a, **b) def __repr__(self): return "hash(%s)" % (repr(dict(self)),) def _test(): import doctest doctest.testmod() if __name__ == "__main__": _test() - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: yet another indentation proposal

2007-08-19 Thread Paddy
. > > Thanks. > > Aaron > > -- > To reply directly, remove j's from email address. Oh wow. it never crossed my mind... Can screen reaaderss be customized? Maybe their is a way to get the screen reader to say indent and dedent at thee appropriate places? Or maybe a filter to put those wordds into the source? - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python syntax r prefix to a string

2007-08-19 Thread Paddy
On Aug 19, 4:43 pm, goldtech <[EMAIL PROTECTED]> wrote: > Does anyone know this syntax and could link me to an explanation? > > Something like: > > Workspace = r'C:\foobar\mystuff\xyz' > > What's that "r" doing? Sometimes I see a "u" too. > > Explanation appreciated. > > Thanks, > Lee G. Search fo

Re: Hot subject: a good python editor and/or IDE?

2007-08-19 Thread Paddy
t still kind of light! > ) Python editor/IDE ? A tiny precision, I am on Ubuntu so I am looking > for a linux compatible editor. > > Cheers, > > Sébastien A hard question to answer. Why not just use the default gnome or kde editors? I've invested time in learning vim which has pai

<    1   2   3   4   5   6   7   >