Re: Python Gotcha's?

2012-04-05 Thread rusi
On Apr 5, 4:06 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: JSON expects double-quote marks, not single:     v = json.loads({'test':'test'})  fails     v = json.loads('{test:test}')  succeeds You mean JSON expects a

Re: escaping/encoding/formatting in python

2012-04-05 Thread rusi
On Apr 6, 6:56 am, Steve Howell showel...@yahoo.com wrote: One of the biggest nuisances for programmers, just beneath date/time APIs in the pantheon of annoyances, is that we are constantly dealing with escaping/encoding/formatting issues. [OT for this list] If you run $ find

Re: escaping/encoding/formatting in python

2012-04-05 Thread rusi
On Apr 6, 10:13 am, Steve Howell showel...@yahoo.com wrote: On Apr 5, 9:59 pm, rusi rustompm...@gmail.com wrote: On Apr 6, 6:56 am, Steve Howell showel...@yahoo.com wrote: One of the biggest nuisances for programmers, just beneath date/time APIs in the pantheon of annoyances, is that we

Re: Python Gotcha's?

2012-04-05 Thread rusi
On Apr 6, 9:54 am, Steve Howell showel...@yahoo.com wrote: JS, YAML, and HTML are pretty similar to Python with respect to single vs. double, as far as I know/remember/care. [Complete ignoramus here -- writing after a few minutes of googling] YAML:

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-04 Thread rusi
On Apr 3, 11:42 pm, Nathan Rice nathan.alexander.r...@gmail.com wrote: Lets start with some analogies.  In cooking, chefs use recipes to produce a meal; the recipe is not a tool.  In architecture, a builder uses a blueprint to produce a building; the blueprint is not a tool. In manufacturing,

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-03 Thread rusi
On Apr 3, 5:39 pm, Nathan Rice nathan.alexander.r...@gmail.com wrote: Don't think underlying, instead think canonical. Ultimately, the answers to your questions exist in the world for you to see.  How does a surgeon describe a surgical procedure?  How does a chef describe a recipe?  How does

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-03 Thread rusi
On Apr 3, 9:15 pm, Nathan Rice nathan.alexander.r...@gmail.com wrote: On Tue, Apr 3, 2012 at 9:51 AM, rusi rustompm...@gmail.com wrote: On Apr 3, 5:39 pm, Nathan Rice nathan.alexander.r...@gmail.com wrote: Don't think underlying, instead think canonical. Ultimately, the answers to your

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-03 Thread rusi
All this futuristic grandiloquence: On Apr 3, 10:17 pm, Nathan Rice nathan.alexander.r...@gmail.com wrote: The crux of my view is that programming languages exist in part because computers in general are not smart enough to converse with humans on their own level, so we have to talk to them

Re: Python is readable

2012-04-02 Thread rusi
On Mar 30, 9:02 pm, Steve Howell showel...@yahoo.com wrote: Steven, how do you predict which abstractions are going to be useless? There was a time when imaginary numbers were just little toys that the mathematicians played around with in their ivory towers. A non-science/math analogous

Re: weird behaviour: pygame plays in shell but not in script

2012-04-02 Thread rusi
On Mar 30, 8:33 am, alex23 wuwe...@gmail.com wrote: On Mar 29, 10:41 pm, Mik mikp...@gmail.com wrote: What a nice way to introduce myself to the group!!! :-) Hey, don't beat yourself up, you:  - summarised the problem in the subject heading  - included actual code showing the problem  -

Re: Number of languages known [was Re: Python is readable] - somewhat OT

2012-04-02 Thread rusi
On Mar 30, 4:37 am, Devin Jeanpierre jeanpierr...@gmail.com wrote: On Thu, Mar 29, 2012 at 3:50 PM, Nathan Rice nathan.alexander.r...@gmail.com wrote: Well, a lisp-like language.  I would also argue that if you are using macros to do anything, the thing you are trying to do should classify

Re: string interpolation for python

2012-04-02 Thread rusi
On Apr 2, 2:11 pm, Yingjie Lan lany...@yahoo.com wrote: Almost as terse, but not as readable, especially... Hi Yingjie, Just in case you are not a native speaker of English, 'terse' is a mildly pejorative word, ie it is not 'good'. You probably want to use something like 'concise', or just

Re: Is there any difference between print 3 and print '3' in Python ?

2012-03-26 Thread rusi
On Mar 27, 8:43 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 26 Mar 2012 08:11:03 -0400, Dave Angel wrote: On 03/26/2012 07:45 AM, redstone-c...@163.com wrote: I know the print statement produces the same result when both of these two instructions are executed ,I

Re: Documentation, assignment in expression.

2012-03-25 Thread rusi
On Mar 25, 6:48 pm, Tim Chase python.l...@tim.thechases.com wrote: The old curmudgeon in me likes the Pascal method of using = for equality-testing, and := for assignment which feels a little closer to mathematical use of =. -tkc Carroll Morgan author of programming from specifications

Re: Python is readable

2012-03-22 Thread rusi
On Mar 23, 7:42 am, Steve Howell showel...@yahoo.com wrote: Do you think we'll always have a huge number of incompatible programming languages?  I agree with you that it's a fact of life in 2012, but will it be a fact of life in 2062? It will be a fact of life wherever Godels theorem is;

Haskellizing python (was Why not use juxtaposition to indicate function application)

2012-03-16 Thread rusi
On Mar 16, 5:45 pm, Ray Song emacs...@gmail.com wrote: I confess i've indulged in Haskell and found     f a more readable than     f(a) And why aren't functions curried (partially applied function is another function which takes the rest arguments) by default? Thanks in advance for any

Re: Enchancement suggestion for argparse: intuit type from default

2012-03-14 Thread rusi
On Mar 14, 2:08 am, r...@panix.com (Roy Smith) wrote: Using argparse, if I write:     parser.add_argument('--foo', default=100) it seems like it should be able to intuit that the type of foo should be int (i.e. type(default)) without my having to write:     parser.add_argument('--foo',

Re: BitSet Redis

2012-03-07 Thread rusi
On Mar 8, 3:02 am, Christian mining.fa...@googlemail.com wrote: I play around with redis. Isn't it  possible to handle BitSet with Python as in Java? BitSet users = BitSet.valueOf(redis.get(key.getBytes())); all.or(users); System.out.println(all.cardinality()) I try something with the

Re: are int, float, long, double, side-effects of computer engineering?

2012-03-06 Thread rusi
On Mar 6, 6:11 am, Xah Lee xah...@gmail.com wrote: some additional info i thought is relevant. are int, float, long, double, side-effects of computer engineering? It is a bit naive for computer scientists to club integers and reals as mathematicians do given that for real numbers, even

Re: entering unicode (was Python usage numbers)

2012-02-19 Thread rusi
On Feb 19, 8:44 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Sun, 12 Feb 2012 19:09:32 -0800, rusi wrote: I have some bunch of sanskrit (devanagari) to type.  It would be easiest for me if I could have the English (roman) as well as the sanskrit (devanagari

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-14 Thread rusi
On Feb 13, 9:01 pm, Rick Johnson rantingrickjohn...@gmail.com wrote: And just how much healthcare dollars are you entitled to exactly? Can you put your entitlement into some form of monetary value? Rick hats off to you man -- you are damn good! Did you study at a top- troll-school? eg.

Re: Python usage numbers

2012-02-12 Thread rusi
On Feb 12, 10:51 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Sun, 12 Feb 2012 15:38:37 +1100, Chris Angelico wrote: Everything that displays text to a human needs to translate bytes into glyphs, and the usual way to do this conceptually is to go via characters.

entering unicode (was Python usage numbers)

2012-02-12 Thread rusi
On Feb 12, 10:36 pm, Nick Dokos nicholas.do...@hp.com wrote: rusi rustompm...@gmail.com wrote: On Feb 12, 10:51 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Sun, 12 Feb 2012 15:38:37 +1100, Chris Angelico wrote: Everything that displays text to a human needs

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-25 Thread rusi
The contents of this thread ostensibly argues about the word 'pretty' Actually it seems to be arguing about the word 'troll' Every other post calls the OP a troll and then outdoes his post in length. This does not match any meaning I can make of trolling. Can someone please explain what 'troll'

Re: Installing Python on CentOS 6 - a big pain

2012-01-20 Thread rusi
On Jan 20, 2:39 pm, Benedict Verheyen benedict.verhe...@gmail.com wrote: On 19/01/2012 5:36, Steven D'Aprano wrote: On Wed, 18 Jan 2012 19:10:43 -0800, alex23 wrote: snip download the tar ball extract the contents of the file cd into the source directory run ./configure run

Re: Python education survey

2011-12-27 Thread rusi
On Dec 27, 11:26 pm, Andrew Berg bahamutzero8...@gmail.com wrote: On 12/27/2011 11:59 AM, K Richard Pixley wrote: You'd do better to encourage eclipse, but setting that up isn't trivial either. IIRC, all I had to do to set up PyDev was copy a URL to Eclipse's Install New Software wizard,

Re: Regular expressions

2011-12-27 Thread rusi
On Dec 27, 10:01 am, Fredrik Tolf fred...@dolda2000.com wrote: On Mon, 26 Dec 2011, mauricel...@acm.org wrote: I've tried re.sub('@\S\s[1-9]:[A-N]:[0-9]', '@\S\s', '@HWI-ST115:568:B08LLABXX: 1:1105:6465:151103 1:N:0:') but it does not seems to work. Indeed, for several reasons. First

Re: Early and late binding [was Re: what does 'a=b=c=[]' do]

2011-12-24 Thread rusi
On Dec 25, 5:32 am, Devin Jeanpierre jeanpierr...@gmail.com wrote: alex23 wrote: Because I believe that the source of confusion has far more to do with mutable/immutable objects than with early/late binding. Masking or 'correcting' an aspect of Python's behaviour because novices make the

Re: what does 'a=b=c=[]' do

2011-12-23 Thread rusi
On Dec 23, 7:10 am, alex23 wuwe...@gmail.com wrote: On Dec 22, 6:51 pm, Rolf Camps r...@roce.be wrote: I'm afraid it's dangerous to encourage the use of '[]' as assignment to a parameter in a function definition. If you use the function several times 'default' always points to the same

Re: what does 'a=b=c=[]' do

2011-12-23 Thread rusi
On Dec 23, 2:59 pm, Chris Angelico ros...@gmail.com wrote: On Fri, Dec 23, 2011 at 7:49 PM, Ethan Furman et...@stoneleaf.us wrote: That is the most ridiculous thing I have heard in a while.  Mutable default arguments are *not* a bug in Python. Reminds me of a bug report a couple years back

Re: what does 'a=b=c=[]' do

2011-12-23 Thread rusi
On Dec 23, 2:39 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 23 Dec 2011 00:38:07 -0800, rusi wrote: Likewise function arguments that default to mutable entities is a known gotcha of python which is best treated as a bug in python. Nonsense. It is a feature

Re: what does 'a=b=c=[]' do

2011-12-23 Thread rusi
On Dec 23, 6:10 pm, Robert Kern robert.k...@gmail.com wrote: On 12/23/11 10:22 AM, rusi wrote: On Dec 23, 2:39 pm, Steven D'Apranosteve +comp.lang.pyt...@pearwood.info  wrote: On Fri, 23 Dec 2011 00:38:07 -0800, rusi wrote: Likewise function arguments that default to mutable

Re: what does 'a=b=c=[]' do

2011-12-23 Thread rusi
On Dec 23, 6:53 pm, Robert Kern robert.k...@gmail.com wrote: On 12/23/11 1:23 PM, rusi wrote: On Dec 23, 6:10 pm, Robert Kernrobert.k...@gmail.com  wrote: On 12/23/11 10:22 AM, rusi wrote: On Dec 23, 2:39 pm, Steven D'Apranosteve +comp.lang.pyt...@pearwood.info    wrote: Some

Re: what does 'a=b=c=[]' do

2011-12-23 Thread rusi
On Dec 23, 8:33 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 23 Dec 2011 06:57:02 -0800, rusi wrote: On Dec 23, 6:53 pm, Robert Kern robert.k...@gmail.com wrote: On 12/23/11 1:23 PM, rusi wrote: [...] Of course it should be fixed.  The repeated recurrence

Re: Python education survey

2011-12-22 Thread rusi
On Dec 21, 9:57 pm, Nathan Rice nathan.alexander.r...@gmail.com wrote: +1 for IPython/%edit using the simplest editor that supports syntax highlighting and line numbers.  I have found that Exploring/Prototyping in the interpreter has the highest ROI of anything I teach people. Nathan It

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-16 Thread rusi
On Dec 16, 3:25 pm, Eelco hoogendoorn.ee...@gmail.com wrote: Pseudo-backwards compatibility with other languages, I couldnt not care less for. Double negations n Goedelian situations have interesting implications (tho here its triple) -- http://mail.python.org/mailman/listinfo/python-list

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread rusi
On Dec 15, 2:44 pm, Eelco hoogendoorn.ee...@gmail.com wrote: In other words, what logic needs is a better exception-handling system, which completes the circle with programming languages quite nicely. :) Cute... but dangerously recursive (if taken literally) Remember that logic is the

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread rusi
On Dec 15, 3:58 pm, Chris Angelico ros...@gmail.com wrote: On Thu, Dec 15, 2011 at 9:47 PM, Robert Kern robert.k...@gmail.com wrote:  42 = 2 mod 5  2 = 42 mod 5 It might make more sense to programmers if you think of it as written: 42 = 2, mod 5 2 = 42, mod 5 ChrisA For the record I

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-14 Thread rusi
On Dec 14, 1:56 pm, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: Is someone saying that _division_ is not defined because -42 div -5 is somehow both 9 and 8? Hm, yes, I see that someone might. The two operations, div and rem, need to be defined together. -

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-14 Thread rusi
in some cases be very useful and enlightening. Its your word versus mine I suppose. Some older discussions: http://groups.google.com/group/comp.lang.python/browse_thread/thread/46435c36f3a13621/896579b757126243?lnk=gstq=rusi+steven+platonism#896579b757126243 http://groups.google.com/group

Re: Python crashes on segmentation error

2011-11-30 Thread rusi
On Dec 1, 3:29 am, Terry Reedy tjre...@udel.edu wrote: On 11/30/2011 7:58 AM, Christian Heimes wrote: Am 30.11.2011 11:42, schrieb Ben Richardson: Python crashes every time i run the following command… import cv Segmentation fault: 11 Python quit unexpectedly - any help would

Re: sick of distribute, setup, and all the rest...

2011-11-28 Thread rusi
On Nov 28, 4:42 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: We don't chase people down on the street and lecture them about the problems we think they are having, we answer questions about ACTUAL problems that they have experienced and asking about. ... ever question gets

Re: sick of distribute, setup, and all the rest...

2011-11-27 Thread rusi
On Nov 28, 2:46 am, Cameron Simpson c...@zip.com.au wrote: On 27Nov2011 23:54, Matt Joiner anacro...@gmail.com wrote: | Agreed. I recently gave Haskell a go, and it was remarkable how | similar the package management is to Python's. | | How well does the new packaging (set for release in

Re: sick of distribute, setup, and all the rest...

2011-11-27 Thread rusi
On Nov 28, 9:37 am, alex23 wuwe...@gmail.com wrote: With that approach in mind, I've never had any real issues using pip, virtualenv etc for managing my development environment. Yes that is in a way my point also: we discuss (things like) pip, virtualenv etc too little. Try working out the

Re: Return of an old friend

2011-11-26 Thread rusi
On Nov 25, 7:19 am, Rick Johnson rantingrickjohn...@gmail.com wrote: Hello Fellow Pythonistas, I am very glad to be back after an unfortunate incident caused my Google account to be deleted. Unfortunately for those of you that have been following along and supporting my crusade to bring

Re: sick of distribute, setup, and all the rest...

2011-11-26 Thread rusi
On Nov 26, 6:40 pm, kj no.em...@please.post wrote: it's an all-out disgrace. when is python going to get a decent module distribution system??? and don't tell me to do it myself: it's clear that the sorry situation we have now is precisely that too many programmers without the requisite

Re: my new project, is this the right way?

2011-11-25 Thread rusi
On Nov 14, 3:41 pm, Tracubik affdfsdfds...@b.com wrote: Hi all, i'm developing a new program. Mission: learn a bit of database management Idea: create a simple, 1 window program that show me a db of movies i've seen with few (10) fields (actors, name, year etc) technologies i'll use: python

Re: Using the Python Interpreter as a Reference

2011-11-25 Thread rusi
On Nov 21, 5:46 am, Travis Parks jehugalea...@gmail.com wrote: Hello: I am currently working on designing a new programming language. It is a compiled language, but I still want to use Python as a reference. Python has a lot of similarities to my language, such as indentation for code

Re: my new project, is this the right way?

2011-11-25 Thread rusi
On Nov 25, 10:16 pm, Roy Smith r...@panix.com wrote: In article 581dab49-e6b0-4fea-915c-4a41fa887...@p7g2000pre.googlegroups.com,  rusi rustompm...@gmail.com wrote: First you must figure out how to structure data -- jargon is normalization. After that you can look at transactions, ACID

Re: Both Python 2.5.2 and 2.7.2 flop the same way under Win 7

2011-11-18 Thread rusi
On Nov 18, 10:12 pm, MRAB pyt...@mrabarnett.plus.com wrote: On 18/11/2011 15:29, W. eWatson wrote: On 11/18/2011 5:11 AM, Neil Cerutti wrote: On 2011-11-18, W. eWatsonwolftra...@invalid.com wrote: On 11/17/2011 4:24 PM, Steven D'Aprano wrote: On Thu, 17 Nov 2011 16:03:14 -0800, W.

Re: compare range objects

2011-10-22 Thread rusi
On Oct 22, 10:51 pm, SigmundV sigmu...@gmail.com wrote: On Oct 22, 6:32 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: Sure. But the downside of sets is that, like lists, they are not lazy, Thank you for pointing this out. I agree that it's not a viable alternative for

Re: Benefit and belief

2011-10-21 Thread rusi
On Oct 21, 11:36 am, Ben Finney ben+pyt...@benfinney.id.au wrote: rusi rustompm...@gmail.com writes: The American programmer would profit more from learning Latin than from learning yet another programming language. Edsger Dijkstra in On the fact that the Atlantic Ocean has two sides

Re: Benefit and belief

2011-10-20 Thread rusi
On Oct 21, 5:31 am, Chris Angelico ros...@gmail.com wrote: On Fri, Oct 21, 2011 at 9:14 AM, Redcat red...@catfolks.net wrote: On Wed, 19 Oct 2011 14:49:26 -0700, Westley Martínez wrote: I think you need to speak German fluently to be a good programmer. No, just Dutch :) Whatever

Re: Benefit and belief

2011-10-19 Thread rusi
On Oct 17, 7:34 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: That is no more deep and meaningful than the fact that while some people say one plus one equals two, others say eins und eins gleich zwei, some say un et un fait deux and some say один и один дает два. Regardless

Re: Equal sets with unequal print and str() representations

2011-10-19 Thread rusi
On Oct 17, 7:47 am, Terry Reedy tjre...@udel.edu wrote: On 10/16/2011 9:17 PM, Ian Kelly wrote: On Sun, Oct 16, 2011 at 5:52 PM, Ganesh Gopalakrishnan gan...@cs.utah.edu  wrote: This probably is known, but a potential pitfall (was, for me) nevertheless. I suspect it is due to hash

Re: Benefit and belief

2011-10-19 Thread rusi
On Oct 19, 4:30 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: rusi rustompm...@gmail.com writes: These are classical platonist claims:  In short objective reality exists aside from the subjective perception of it. Yes, that's the simplest explanation for the comparability of our

Re: help

2011-10-08 Thread rusi
On Oct 8, 2:51 pm, X1 x...@x1.x1.x1.net wrote: easy_install does not exist on Fedora. http://lmgtfy.com/?q=easy_install+fedora -- http://mail.python.org/mailman/listinfo/python-list

Re: Usefulness of the not in operator

2011-10-08 Thread rusi
On Oct 8, 6:31 pm, Roy Smith r...@panix.com wrote: In article 87ehyn8xlp@dpt-info.u-strasbg.fr,  Alain Ketterlin al...@dpt-info.u-strasbg.fr wrote: Sure, but note that you can also reformulate != using not and ==, using not and =, etc. Operators like not in and is not should really

Re: PyDev 2.2.3 Released

2011-10-06 Thread rusi
On Oct 6, 11:03 pm, Fabio Zadrozny fzadro...@appcelerator.com wrote: Hi All, PyDev 2.2.3 has been released Details on PyDev:http://pydev.org Details on its development:http://pydev.blogspot.com On my debian box I get: $ /opt/Aptana\ Studio\ 3/AptanaStudio3 HandleConsoleMessage(Uncaught

Re: Python Migration Error: TypeError: exceptions must be old-style classes or derived from BaseException, not str

2011-10-03 Thread rusi
On Oct 3, 12:45 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Oct 2, 2011 at 11:45 PM, Wong Wah Meng-R32813 r32...@freescale.com wrote: Hello guys, I am migrating my application from python 1.5.2 to 2.7.1. I encountered an error when I run some commands (I put in debug statement

Re: Chaos Theory [was Re: Benefit and belief]

2011-10-02 Thread rusi
On Oct 2, 8:03 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: By the way, who removed the OT label from the subject line? Please don't unless it actually comes back on topic. DevPlayer wrote: I still assert that contradiction is caused by narrow perspective. There's no

Re: Replacing spreadsheets by Python and the browser

2011-10-02 Thread rusi
On Oct 2, 10:36 pm, markolopa marko.lopa...@gmail.com wrote: Hello, Could you please recommend me a Python tool that could help me to get rid of the messy information and scripts I have in spreadsheets? Spreadsheets are great for having simple things done quickly. But as the needs grow

Re: Change import order with *.pth files

2011-10-02 Thread rusi
On 10/02/2011 10:29 PM, Andrea Gavana wrote: Hi All,     my apologies if this is a dumb question, but I couldn't find a solution  - possibly because I am not sure how to state my problem in a short sentence. I think this (and such) are important questions and I too await answers. It seems

Re: Benefit and belief

2011-09-30 Thread rusi
On Sep 30, 4:03 am, Devin Jeanpierre jeanpierr...@gmail.com wrote: But anyway, no, we don't agree on what it means to be friendly or what a hostile atmosphere is. I've noticed that people tend to be a lot harsher here than what I'm used to, so perhaps your attitude to it is more common on

Re: Benefit and belief

2011-09-30 Thread rusi
, but only of positions on the Earth. But just imagine that we were all pre-galiliean savages -- knowing nothing about the roundness of the earth, the earth going round and so on and somehow you and I get on the phone and we start arguing: Rusi: Its 9:30 pm Neil: No its 12 noon How many cases

Re: Benefit and belief

2011-09-30 Thread rusi
On Sep 30, 9:41 pm, Chris Angelico ros...@gmail.com wrote: On Sat, Oct 1, 2011 at 2:38 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:        And I would argue that by starting with Look out your window... you have explicitly excluded the rest of the world from consideration in

Re: Functions vs OOP

2011-09-04 Thread rusi
On Sep 3, 9:15 pm, William Gill nore...@domain.invalid wrote: During some recent research, and re-familiarization with Python, I came across documentation that suggests that programming using functions, and programming using objects were somehow opposing techniques. Staying with (for the

regex question

2011-07-29 Thread rusi
Can someone throw some light on this anomalous behavior? import re r = re.search('a(b+)', 'ababbaaab') r.group(1) 'b' r.group(0) 'ab' r.group(2) Traceback (most recent call last): File stdin, line 1, in module IndexError: no such group re.findall('a(b+)', 'ababbaaab') ['b',

Re: PEP 8 and extraneous whitespace

2011-07-22 Thread rusi
On Jul 22, 10:05 pm, Michiel Overtoom mot...@xs4all.nl wrote: On Jul 22, 2011, at 12:23, Thomas Jollans wrote: On 22/07/11 10:11, Thomas Rachel wrote: Am 22.07.2011 00:45 schrieb Terry Reedy: Whether or not they are intended, the rationale is that lining up does not work with

Re: (Maybe off topic) Can someone explain what a finite state machine is?

2011-07-20 Thread rusi
On Jul 19, 6:32 pm, Matty Sarro msa...@gmail.com wrote: Hey everyone. I am currently reading through an RFC, and it mentions that a client and server half of a transaction are embodied by finite state machines. I am reading through the wikipedia article for finite state machines, and sadly

Re: a little parsing challenge ☺

2011-07-20 Thread rusi
On Jul 20, 9:31 pm, Uri Guttman u...@stemsystems.com wrote: a better parsing challenge. how can you parse usenet to keep this troll from posting on the wrong groups on usenet? first one to do so, wins the praise of his peers. 2nd one to do it makes sure the filter stays in place. all the rest

Re: Recommendations for household finance scripting?

2011-07-18 Thread rusi
On Jul 18, 8:03 pm, markolopa marko.lopa...@gmail.com wrote: Hello! I would like to find a good system to keep track of my household finance. Do Python programmers have suggestions on that? Do you use Python to help on this task? I am considering a large set of solutions: - Pure

Re: a little parsing challenge ☺

2011-07-18 Thread rusi
On Jul 19, 7:07 am, Billy Mays no...@nohow.com wrote: On 7/18/2011 7:56 PM, Steven D'Aprano wrote: Billy Mays wrote: On 07/17/2011 03:47 AM, Xah Lee wrote: 2011-07-16 I gave it a shot.  It doesn't do any of the Unicode delims, because let's face it, Unicode is for goobers.

Re: a little parsing challenge ☺

2011-07-18 Thread rusi
On Jul 19, 8:11 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: rusi wrote: Every time I try to understand unicode and remain stuck I come to the conclusion that I must be an imbecile. http://www.joelonsoftware.com/articles/Unicode.html -- Steven Yes Ive read

Re: Tabs -vs- Spaces: Tabs should have won.

2011-07-17 Thread rusi
On Jul 17, 4:11 pm, Dotan Cohen dotanco...@gmail.com wrote: On Sun, Jul 17, 2011 at 11:35, Andrew Berg bahamutzero8...@gmail.com wrote: programing in a non-fixed width font is a real pleasure If you're masochistic, maybe. Do you find fixed-width fonts ugly? I don't find that fixed-width

Re: a little parsing challenge ☺

2011-07-17 Thread rusi
On Jul 17, 4:34 pm, Chris Angelico ros...@gmail.com wrote: On Sun, Jul 17, 2011 at 5:47 PM, Xah Lee xah...@gmail.com wrote: the problem is to write a script that can check a dir of text files (and all subdirs) and reports if a file has any mismatched matching brackets. I wonder will it be

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-13 Thread rusi
On Jul 13, 5:22 am, CM cmpyt...@gmail.com wrote: On Jul 12, 5:18 pm, rantingrick rantingr...@gmail.com wrote: Kevin made the argument earlier that Tkinter (and others) are so easy to use that they render needing a GUI builder useless -- and he is correct! But did you know that there are

Re: Python Wizard, with apologies to The Who

2011-07-13 Thread rusi
On Jul 13, 5:53 pm, Chris Angelico ros...@gmail.com wrote: On Wed, Jul 13, 2011 at 10:46 PM, bruno.desthuilli...@gmail.com bruno.desthuilli...@gmail.com wrote: On Jul 12, 6:40 pm, John Keisling maththespia...@gmail.com wrote: After too much time coding Python scripts and reading Mark Lutz's

Re: Lisp refactoring puzzle

2011-07-12 Thread rusi
On Jul 13, 9:39 am, Terry Reedy tjre...@udel.edu wrote: On 7/12/2011 2:23 PM, gene heskett wrote: Now, I hate to mention it Terry, but your clock seems to be about 126 months behind the rest of the world. Please do not hate to be helpful. Ha Ha. Cute one. Thanks --

Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread rusi
On Jul 11, 7:39 pm, Chris Angelico ros...@gmail.com wrote: On Tue, Jul 12, 2011 at 12:21 AM, sturlamolden sturlamol...@yahoo.no wrote: You are probably aware that Unix and Unix customers have been around since the 1970s. I would expect the paradigm to be changed by now. The paradigm of

Re: Morelia for BDD in Python

2011-07-10 Thread rusi
On Jul 10, 10:21 am, Ben Finney ben+pyt...@benfinney.id.au wrote: Phlip phlip2...@gmail.com writes: 'sudo pip install morelia' just worked for me, on Ubuntu. The problem with ‘pip’ is that it's a parallel package installation that ignores the available package management system on the OS.

Re: Is there any advantage or disadvantage to using sets over list comps to ensure a list of unique entries?

2011-06-20 Thread rusi
On Jun 21, 12:43 am, deathweaselx86 deathwea...@gmail.com wrote: Howdy guys, I am new. I've been converting lists to sets, then back to lists again to get unique lists. Maybe you should consider whether its best to work with sets only and not use lists at all. This needs to be said because:

Re: What is this syntax ?

2011-06-19 Thread rusi
On Jun 19, 8:39 pm, Roy Smith r...@panix.com wrote: This is one of the (very) few places PHP wins over Python.  In PHP, I would write this as print '$x' You dont find print '%s' % x readable? Why? -- http://mail.python.org/mailman/listinfo/python-list

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile toImprovethe Dvorak Layout?

2011-06-19 Thread rusi
On Jun 19, 10:50 am, Lie Ryan lie.1...@gmail.com wrote: On 06/19/11 15:14, rusi wrote: On Jun 19, 9:21 am, Lie Ryan lie.1...@gmail.com wrote: On 06/18/11 03:53, Xah Lee wrote: On Jun 15, 5:43 am, rusi rustompm...@gmail.com wrote: On Jun 15, 5:32 pm, Dotan Cohen dotanco...@gmail.com

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improvethe Dvorak Layout?

2011-06-18 Thread rusi
On Jun 19, 9:21 am, Lie Ryan lie.1...@gmail.com wrote: On 06/18/11 03:53, Xah Lee wrote: On Jun 15, 5:43 am, rusi rustompm...@gmail.com wrote: On Jun 15, 5:32 pm, Dotan Cohen dotanco...@gmail.com wrote: Thanks. From testing small movements with my fingers I see that the fourth finger

Re: Embedding Python in a shell script

2011-06-16 Thread rusi
On Jun 17, 6:05 am, Chris Angelico ros...@gmail.com wrote: Python call becomes.  I'd prefer something like: #!/bin/bash for i in 1 2 3 4; do   python -c if True: # comfortably indented python code Thanks. Nice! -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path and Path

2011-06-16 Thread rusi
On Jun 17, 7:55 am, Ned Deily n...@acm.org wrote: In article ite8950...@news6.newsguy.com,  Chris Torek nos...@torek.net wrote: Steven D'Aprano wrote: Why do you think there's no Path object in the standard library? *wink* In article mailman.16.1308239495.1164.python-l...@python.org

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-15 Thread rusi
On Jun 15, 9:35 am, Dotan Cohen dotanco...@gmail.com wrote: On Wed, Jun 15, 2011 at 06:00, rusi rustompm...@gmail.com wrote: For keyboarding (in the piano/organ sense) the weakest finger is not the fifth/pinky but the fourth. Because for the fifth you will notice that the natural movement

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-15 Thread rusi
On Jun 15, 5:32 pm, Dotan Cohen dotanco...@gmail.com wrote: Thanks. From testing small movements with my fingers I see that the fourth finger is in fact a bit weaker than the last finger, but more importantly, it is much less dexterous. Good to know! Most of the piano technique-icians

Re: Keyboard Layout: Dvorak vs Colemak: is it Worthwhile to Improve the Dvorak Layout?

2011-06-14 Thread rusi
On Jun 15, 5:11 am, Chris Angelico ros...@gmail.com wrote: On Wed, Jun 15, 2011 at 12:50 AM, Dotan Cohen dotanco...@gmail.com wrote: And disproportionate usage of fingers. On QWERTY the weakest fingers (pinkies) do almost 1/4 of the keypresses when modifier keys, enter, tab, and backspace

Re: debian defaults not up-to-date

2011-06-12 Thread rusi
On Jun 12, 10:25 pm, blues2use blues2use@remove_gmail.com wrote: Just finished installing Mint 10 and all has gone well. However, when I removed some applications, I received this error during the removal: INFO: using unknown version '/usr/bin/python2.7' (debian_defaults not up- to-date?)

Re: uhmm... your chance to spit on me

2011-06-11 Thread rusi
On Jun 11, 5:36 am, Jim Burton j...@sdf-eu.org wrote: Xah Lee xah...@gmail.com writes: Dear lisp comrades, it's Friday! The answers to your question give poor coverage of the possible responses to your writing. I myself enjoy reading what you write, most of the time, but become bored

Re: how to avoid leading white spaces

2011-06-08 Thread rusi
On Jun 7, 11:37 pm, ru...@yahoo.com ru...@yahoo.com wrote: On 06/06/2011 08:33 AM, rusi wrote: For any significant language feature (take recursion for example) there are these issues: 1. Ease of reading/skimming (other's) code 2. Ease of writing/designing one's own 3. Learning curve

Re: how to avoid leading white spaces

2011-06-08 Thread rusi
On Jun 8, 7:38 pm, ru...@yahoo.com ru...@yahoo.com wrote: On 06/07/2011 06:30 PM, Roy Smith wrote: On 06/06/2011 08:33 AM, rusi wrote: Evidently for syntactic, implementation and cultural reasons, Perl programmers are likely to get (and then overuse) regexes faster than python

Re: how to avoid leading white spaces

2011-06-06 Thread rusi
For any significant language feature (take recursion for example) there are these issues: 1. Ease of reading/skimming (other's) code 2. Ease of writing/designing one's own 3. Learning curve 4. Costs/payoffs (eg efficiency, succinctness) of use 5. Debug-ability I'll start with 3. When someone of

Re: Lambda question

2011-06-06 Thread rusi
On Jun 5, 11:33 pm, Terry Reedy tjre...@udel.edu wrote: On 6/5/2011 5:31 AM, Alain Ketterlin wrote: jyoun...@kc.rr.com  writes: f = lambda x, n, acc=[]: f(x[n:], n, acc+[(x[:n])]) if x else acc f=lambda ... statements are inferior for practical purposes to the equivalent def f statements

Re: Something is rotten in Denmark...

2011-06-05 Thread rusi
On Jun 3, 11:17 am, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: rusi writes: So I tried: Recast the comprehension as a map Rewrite the map into a fmap (functionalmap) to create new bindings def fmap(f,lst):     if not lst: return []     return [f(lst[0])] + fmap(f, lst[1

Re: how to avoid leading white spaces

2011-06-05 Thread rusi
On Jun 3, 7:25 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: Regarding their syntax, I'd like to point out that even Larry Wall is dissatisfied with regex culture in the Perl community: http://www.perl.com/pub/2002/06/04/apo5.html This is a very good link. And it can be a

Re: Something is rotten in Denmark...

2011-06-05 Thread rusi
On Jun 5, 5:03 pm, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: rusi writes: On Jun 3, 11:17 am, Jussi Piitulainen wrote: rusi writes: So I tried: Recast the comprehension as a map Rewrite the map into a fmap (functionalmap) to create new bindings def fmap(f,lst

Re: float(nan) in set or as key

2011-06-04 Thread rusi
On Jun 4, 4:29 am, Nobody nob...@nowhere.com wrote: On Fri, 03 Jun 2011 14:52:39 +, Grant Edwards wrote: It's arguable that NaN itself simply shouldn't exist in Python; if the FPU ever generates a NaN, Python should raise an exception at that point. If you're fluent in IEEE-754,

<    3   4   5   6   7   8   9   10   >