Re: New to Python - block grouping (spaces)

2015-04-25 Thread Albert van der Horst
In article , Rustom Mody wrote: >On Monday, April 20, 2015 at 4:00:16 PM UTC+5:30, Steven D'Aprano wrote: >> On Monday 20 April 2015 12:43, Rustom Mody wrote: >> >> > You've a 10-file python project in which you want to replace function 'f' >> > by function 'longname' >> > How easy is it? >> >> A

Re: New to Python - block grouping (spaces)

2015-04-25 Thread Rustom Mody
On Saturday, April 25, 2015 at 12:57:34 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > Some rambly ruminations on switchable (aka firstclass) syntax > > http://blog.languager.org/2015/04/poverty-universality-structure-0.html > > I'll ruminate in response: Thanks for a connoisseur review

Re: New to Python - block grouping (spaces)

2015-04-25 Thread Marko Rauhamaa
Rustom Mody : > Some rambly ruminations on switchable (aka firstclass) syntax > http://blog.languager.org/2015/04/poverty-universality-structure-0.html I'll ruminate in response: * The awesomeness of lisp is in lambda calculus and not in macros. * Lisp syntax is actually not quite first-class

Re: New to Python - block grouping (spaces)

2015-04-24 Thread Rustom Mody
On Friday, April 17, 2015 at 10:36:13 PM UTC+5:30, BartC wrote: > (Actually *I* would quite like to know why languages don't have > switchable syntax anyway to allow for people's personal preferences.) Some rambly ruminations on switchable (aka firstclass) syntax http://blog.languager.org/2015/04

Re: New to Python - block grouping (spaces)

2015-04-24 Thread Michael Torrie
On 04/24/2015 01:31 AM, Mark Lawrence wrote: > On 16/04/2015 15:52, Blake McBride wrote: >> So, Python may be a cute language for you to use as an individual, but it >> is unwieldy in a real development environment. >> > > First paragraph from > http://www.talkpythontome.com/episodes/show/4/ent

Re: New to Python - block grouping (spaces)

2015-04-24 Thread Mark Lawrence
On 16/04/2015 15:52, Blake McBride wrote: So, Python may be a cute language for you to use as an individual, but it is unwieldy in a real development environment. First paragraph from http://www.talkpythontome.com/episodes/show/4/enterprise-python-and-large-scale-projects Mahmoud is lead

Re: New to Python - block grouping (spaces)

2015-04-22 Thread Mark Lawrence
On 22/04/2015 12:37, Rustom Mody wrote: On Wednesday, April 22, 2015 at 9:35:34 AM UTC+5:30, llanitedave wrote: On Tuesday, April 21, 2015 at 8:12:07 PM UTC-7, Rustom Mody wrote: On Wednesday, April 22, 2015 at 3:05:57 AM UTC+5:30, llanitedave wrote: On Tuesday, April 21, 2015 at 10:49:34 AM U

Re: New to Python - block grouping (spaces)

2015-04-22 Thread Rustom Mody
On Wednesday, April 22, 2015 at 9:35:34 AM UTC+5:30, llanitedave wrote: > On Tuesday, April 21, 2015 at 8:12:07 PM UTC-7, Rustom Mody wrote: > > On Wednesday, April 22, 2015 at 3:05:57 AM UTC+5:30, llanitedave wrote: > > > On Tuesday, April 21, 2015 at 10:49:34 AM UTC-7, Rustom Mody wrote: > > > >

Re: New to Python - block grouping (spaces)

2015-04-21 Thread llanitedave
On Tuesday, April 21, 2015 at 8:12:07 PM UTC-7, Rustom Mody wrote: > On Wednesday, April 22, 2015 at 3:05:57 AM UTC+5:30, llanitedave wrote: > > On Tuesday, April 21, 2015 at 10:49:34 AM UTC-7, Rustom Mody wrote: > > > If only Galileo had had you as lawyer... > > > > Well, I'd asked Giordano Bruno

Re: New to Python - block grouping (spaces)

2015-04-21 Thread Rustom Mody
On Wednesday, April 22, 2015 at 3:05:57 AM UTC+5:30, llanitedave wrote: > On Tuesday, April 21, 2015 at 10:49:34 AM UTC-7, Rustom Mody wrote: > > If only Galileo had had you as lawyer... > > Well, I'd asked Giordano Bruno for a positive recommendation. For some > inexplicable reason, he declined.

Re: New to Python - block grouping (spaces)

2015-04-21 Thread llanitedave
On Tuesday, April 21, 2015 at 10:49:34 AM UTC-7, Rustom Mody wrote: > On Tuesday, April 21, 2015 at 9:01:08 PM UTC+5:30, llanitedave wrote: > > On Sunday, April 19, 2015 at 7:09:02 PM UTC-7, Rustom Mody wrote: > > > > > > > > > let me spell it out: > > > Prestige of Aristotle stymies progress of p

Re: New to Python - block grouping (spaces)

2015-04-21 Thread Rustom Mody
On Tuesday, April 21, 2015 at 9:01:08 PM UTC+5:30, llanitedave wrote: > On Sunday, April 19, 2015 at 7:09:02 PM UTC-7, Rustom Mody wrote: > > > > > > let me spell it out: > > Prestige of Aristotle stymies progress of physics of 2 millennia > > likewise > > Prestige of Unix development environment

Re: New to Python - block grouping (spaces)

2015-04-21 Thread llanitedave
On Sunday, April 19, 2015 at 7:09:02 PM UTC-7, Rustom Mody wrote: > > > let me spell it out: > Prestige of Aristotle stymies progress of physics of 2 millennia > likewise > Prestige of Unix development environment keeps us stuck with text files when > the world has moved on Difference is, Aristo

Re: New to Python - block grouping (spaces)

2015-04-20 Thread Rustom Mody
On Monday, April 20, 2015 at 9:14:23 AM UTC+5:30, Chris Angelico wrote: > I definitely don't see how a non-text source code format would improve > on it. Feel like elaborating? You are putting emphasis on the 'non'. This puts you into an oscillatory system between tautology and contradiction: How

Re: New to Python - block grouping (spaces)

2015-04-20 Thread BartC
On 20/04/2015 11:30, Steven D'Aprano wrote: On Monday 20 April 2015 12:43, Rustom Mody wrote: You've a 10-file python project in which you want to replace function 'f' by function 'longname' How easy is it? About a thousand times easier than the corresponding situation: You have ten PDF file

Re: New to Python - block grouping (spaces)

2015-04-20 Thread Rustom Mody
On Monday, April 20, 2015 at 4:00:16 PM UTC+5:30, Steven D'Aprano wrote: > On Monday 20 April 2015 12:43, Rustom Mody wrote: > > > You've a 10-file python project in which you want to replace function 'f' > > by function 'longname' > > How easy is it? > > About a thousand times easier than the co

Re: New to Python - block grouping (spaces)

2015-04-20 Thread Steven D'Aprano
On Monday 20 April 2015 12:43, Rustom Mody wrote: > You've a 10-file python project in which you want to replace function 'f' > by function 'longname' > How easy is it? About a thousand times easier than the corresponding situation: You have ten PDF files in which you want to replace the word "f

Re: New to Python - block grouping (spaces)

2015-04-20 Thread Steven D'Aprano
On Monday 20 April 2015 18:38, Gregory Ewing wrote: > Steven D'Aprano wrote: >> Wheels have been round for thousands of years! Why can't we >> try something modern, like triangular wheels? > > http://en.wikipedia.org/wiki/Reuleaux_triangle > > http://blog.geomblog.org/2004/04/square-wheels.html

Re: New to Python - block grouping (spaces)

2015-04-20 Thread edmondo . giovannozzi
I work in research and mainly use Fortran and Python. I haven't had any problem with the python indentation. I like it, I find it simple and easy. Well, sometimes I may forget to close an IF block with an ENDIF, in Fortran, so used I am on ending a block just decreasing the indentation, not a

Re: New to Python - block grouping (spaces)

2015-04-20 Thread Gregory Ewing
Steven D'Aprano wrote: Wheels have been round for thousands of years! Why can't we try something modern, like triangular wheels? http://en.wikipedia.org/wiki/Reuleaux_triangle http://blog.geomblog.org/2004/04/square-wheels.html -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Apr 20, 2015 at 12:54 PM, Steven D'Aprano > wrote: >> On Mon, 20 Apr 2015 06:41 am, Marko Rauhamaa wrote: >> Python has a noncanonical textual representation? >> >> What is a noncanonical textual representation, and where can I see >> some? > > I think what Marko means

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Chris Angelico
On Mon, Apr 20, 2015 at 1:28 PM, Rustom Mody wrote: >> If you have a ten-file project that's identifying a key function >> globally as 'f', then you already have a problem. If your names are >> more useful and informative, a global search-and-replace will do the >> job. > > Are you sure your globa

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Rustom Mody
On Monday, April 20, 2015 at 8:34:12 AM UTC+5:30, Chris Angelico wrote: > On Mon, Apr 20, 2015 at 12:43 PM, Rustom Mody wrote: > > The key thing to make this work is that the tab needs to be a reasonably > > solid > > non-leaky abstraction for denoting an indent. > > As soon as you allow both tab

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Chris Angelico
On Mon, Apr 20, 2015 at 12:54 PM, Steven D'Aprano wrote: > On Mon, 20 Apr 2015 06:41 am, Marko Rauhamaa wrote: > >> Lisp has a noncanonical textual representation just like Python. > > Python has a noncanonical textual representation? > > What is a noncanonical textual representation, and where ca

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Chris Angelico
On Mon, Apr 20, 2015 at 12:43 PM, Rustom Mody wrote: > The key thing to make this work is that the tab needs to be a reasonably solid > non-leaky abstraction for denoting an indent. > As soon as you allow both tabs and spaces all the interminable bikeshedding > starts > Whatever you change, ther

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Mon, 20 Apr 2015 06:41 am, Marko Rauhamaa wrote: > Lisp has a noncanonical textual representation just like Python. Python has a noncanonical textual representation? What is a noncanonical textual representation, and where can I see some? -- Steven -- https://mail.python.org/mailman/lis

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Rustom Mody
On Monday, April 20, 2015 at 7:54:37 AM UTC+5:30, Chris Angelico wrote: > On Mon, Apr 20, 2015 at 12:08 PM, Rustom Mody wrote: > > Prestige of Unix development environment keeps us stuck with text files when > > the world has moved on > > And what, pray, would we gain by using non-text source cod

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Mon, 20 Apr 2015 04:07 am, Dan Sommers wrote: > Smalltalk, Forth, and LISP don't follow the program=textfile system > (although LISP can, and does sometimes); Correct, and the fact that they wrapped code and environment into a completely opaque image was a major factor in their decline in popu

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Mark Lawrence
On 20/04/2015 03:08, Rustom Mody wrote: Prestige of Unix development environment keeps us stuck with text files when the world has moved on If it ain't broke, don't fix it. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Chris Angelico
On Mon, Apr 20, 2015 at 12:08 PM, Rustom Mody wrote: > Prestige of Unix development environment keeps us stuck with text files when > the world has moved on And what, pray, would we gain by using non-text source code? Aside from binding ourselves to a set of tools, which would create an even wors

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Rustom Mody
On Sunday, April 19, 2015 at 11:23:20 PM UTC+5:30, Steven D'Aprano wrote: > Programmers use source code as text for the same reason that wheels are > still round. Wheels have been round for thousands of years! Why can't we > try something modern, like triangular wheels? Or something fractal in > th

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Rustom Mody
On Monday, April 20, 2015 at 2:11:13 AM UTC+5:30, Marko Rauhamaa wrote: > Michael Torrie: > > > On 04/18/2015 01:00 AM, Marko Rauhamaa wrote: > >> It would be possible to define a canonical AST storage format. Then, > >> your editor could "incarnate" the AST in the syntax of your choosing. > > > >

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Rustom Mody
On Sunday, April 19, 2015 at 11:38:45 PM UTC+5:30, Dan Sommers wrote: > What's to revamp? My IDE is UNIX. Precisely my point: source-file = text-file is centerstage of Unix philosophy If you want to start by questioning that, you must question not merely the language (python or whatever) but th

Re: New to Python - block grouping (spaces)

2015-04-19 Thread BartC
On 20/04/2015 00:59, Ben Finney wrote: BartC writes: I used actual languages Python and C in my example, I should have used A and B or something. If you had, then the topic drifts so far from being relevant to a Python programming forum that I'd ask you to stop. Perhaps that should have hap

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Ben Finney
BartC writes: > I used actual languages Python and C in my example, I should have used > A and B or something. If you had, then the topic drifts so far from being relevant to a Python programming forum that I'd ask you to stop. Perhaps that should have happened much sooner. -- \ “If we

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Ron Adam
On 04/19/2015 05:42 PM, BartC wrote: So I'm aware of some of the things that are involved. (BTW that project worked reasonably well, but I decided to go in a different direction: turning "J" from a mere syntax into an actual language of its own.) Something you might try with your new langua

Re: New to Python - block grouping (spaces)

2015-04-19 Thread BartC
On 19/04/2015 13:59, Ben Finney wrote: BartC writes: Why shouldn't A configure his editor to display a Python program in C-like syntax, and B configure their editor to use Python-like tabbed syntax? I don't recall anyone saying that *shouldn't* be done. Feel free to make, and maintain and su

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Marko Rauhamaa
Michael Torrie : > On 04/18/2015 01:00 AM, Marko Rauhamaa wrote: >> It would be possible to define a canonical AST storage format. Then, >> your editor could "incarnate" the AST in the syntax of your choosing. > > As was just mentioned in another part of the thread, what you're > describing is ess

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Paul Rubin
Steven D'Aprano writes: > You might be interested in the Coffeescript model> > You'll notice that Coffeescript isn't a mere preprocessor or source code > transformation. I like Purescript (purescript.org) better than Coffeescript, but either way, I don't see Python as an attractive target fo

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Chris Angelico
On Mon, Apr 20, 2015 at 4:07 AM, Dan Sommers wrote: > IMO, until git's successor tracks content-_not_-delimited-by-linefeeds, > languages will continue to work that way. Linefeeds are nothing to git - it tracks the entire content of the file. When you ask to see the diff between two versions of a

Re: New to Python - block grouping (spaces)

2015-04-19 Thread CHIN Dihedral
On Thursday, April 16, 2015 at 11:06:28 PM UTC+8, Mark Lawrence wrote: > On 16/04/2015 15:52, Blake McBride wrote: > > > So, Python may be a cute language for you to use as an individual, but it > > is unwieldy in a real development environment. > > > > Thanks for this, one of the funniest comme

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Mel Wilson
On Mon, 20 Apr 2015 03:53:08 +1000, Steven D'Aprano wrote: > On Mon, 20 Apr 2015 02:03 am, Rustom Mody wrote: >> Well evidently some people did but fortunately their managers did not >> interfere. > > You are assuming they had managers. University life isn't exactly the > same as corporate cultu

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Dan Sommers
On Sun, 19 Apr 2015 09:03:23 -0700, Rustom Mody wrote: > Now if Thomson and Ritchie (yeah thems the guys) could do it in 1970, > why cant we revamp this 45-year old archaic program=textfile system > today? Revamp? What's to revamp? C, C++, C#, Java, FORTRAN, Python, Perl, Ruby, POSIX shells, Ja

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Mon, 20 Apr 2015 02:03 am, Rustom Mody wrote: > On Sunday, April 19, 2015 at 8:45:27 PM UTC+5:30, Chris Angelico wrote: > > > >> I suspect you'll find the task fundamentally hard. > > How hard? > Lets see. > Two guys wanted to write an OS. > Seeing current languages not upto their standard

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Sun, 19 Apr 2015 09:38 pm, BartC wrote: > (I think much of the problem that most languages are intimately > associated with their specific syntax, so that people can't see past it > to what the code is actually saying. a=b, a:=b, b=>a, (setf a b), > whatever the syntax is, who cares? We just wa

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Mel Wilson
On Sun, 19 Apr 2015 09:03:23 -0700, Rustom Mody wrote: > Now if Thomson and Ritchie (yeah thems the guys) could do it in 1970, > why cant we revamp this 45-year old archaic program=textfile system > today? Dunno. Why not? There's half of you right there. -- https://mail.python.org/mailman/lis

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Michael Torrie
On 04/18/2015 01:00 AM, Marko Rauhamaa wrote: > Ben Finney : > >> If you only write programs that will only ever be read by you and >> no-one else, feel free to maintain a fork of Python (or any other >> language) that suits your personal preferences. > > It would be possible to define a canonica

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Rustom Mody
On Sunday, April 19, 2015 at 8:45:27 PM UTC+5:30, Chris Angelico wrote: > I suspect you'll find the task fundamentally hard. How hard? Lets see. Two guys wanted to write an OS. Seeing current languages not upto their standard they first made themselves a suitable language. Would you call their

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Chris Angelico
On Sun, Apr 19, 2015 at 9:38 PM, BartC wrote: > Suppose there were just two syntaxes: C-like and Python-like (we'll put > aside for a minute the question of what format is used to store Python > source code). > > Why shouldn't A configure his editor to display a Python program in C-like > syntax,

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Rustom Mody
On Sunday, April 19, 2015 at 5:15:07 PM UTC+5:30, BartC wrote: > On 18/04/2015 03:22, Rustom Mody wrote: > > On Saturday, April 18, 2015 at 6:49:30 AM UTC+5:30, Dan Sommers wrote: > >> On Fri, 17 Apr 2015 18:05:52 +0100, BartC wrote: > >> > >>> (Actually *I* would quite like to know why languages d

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Mark Lawrence
On 19/04/2015 13:59, Ben Finney wrote: BartC writes: Why shouldn't A configure his editor to display a Python program in C-like syntax, and B configure their editor to use Python-like tabbed syntax? I don't recall anyone saying that *shouldn't* be done. Feel free to make, and maintain and su

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Sun, 19 Apr 2015 09:38 pm, BartC wrote: > Suppose there were just two syntaxes: C-like and Python-like (we'll put > aside for a minute the question of what format is used to store Python > source code). > > Why shouldn't A configure his editor to display a Python program in > C-like syntax, an

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Steven D'Aprano
On Sun, 19 Apr 2015 09:44 pm, BartC wrote: > When I sometimes want to code in Python, why can't I used my usual syntax? When I go to China, why doesn't everyone speak English for my convenience? I'll tell you what. When you convince the makers of C compilers to support Python syntax as an altern

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Dave Angel
On 04/19/2015 07:38 AM, BartC wrote: Perhaps you don't understand what I'm getting at. Suppose there were just two syntaxes: C-like and Python-like (we'll put aside for a minute the question of what format is used to store Python source code). Why shouldn't A configure his editor to displa

Re: New to Python - block grouping (spaces)

2015-04-19 Thread Ben Finney
BartC writes: > Why shouldn't A configure his editor to display a Python program in > C-like syntax, and B configure their editor to use Python-like tabbed > syntax? I don't recall anyone saying that *shouldn't* be done. Feel free to make, and maintain and support and propagate and keep pace wit

Re: New to Python - block grouping (spaces)

2015-04-19 Thread BartC
On 18/04/2015 03:22, Rustom Mody wrote: On Saturday, April 18, 2015 at 6:49:30 AM UTC+5:30, Dan Sommers wrote: On Fri, 17 Apr 2015 18:05:52 +0100, BartC wrote: (Actually *I* would quite like to know why languages don't have switchable syntax anyway to allow for people's personal preferences.)

Re: New to Python - block grouping (spaces)

2015-04-19 Thread BartC
On 18/04/2015 03:22, Ben Finney wrote: BartC writes: (Actually *I* would quite like to know why languages don't have switchable syntax anyway to allow for people's personal preferences.) Which people's personal preferences? Are these the same people who have such passionate disagreement abou

Re: New to Python - block grouping (spaces)

2015-04-18 Thread Marko Rauhamaa
Rustom Mody : >> It would be possible to define a canonical AST storage format. Then, >> your editor could "incarnate" the AST in the syntax of your choosing. >> >> [...] > > Things like comments are a headache -- they have to be shoved into the > AST rather artificially I don't think comments w

Re: New to Python - block grouping (spaces)

2015-04-18 Thread Rustom Mody
On Saturday, April 18, 2015 at 12:30:49 PM UTC+5:30, Marko Rauhamaa wrote: > Ben Finney : > > > If you only write programs that will only ever be read by you and > > no-one else, feel free to maintain a fork of Python (or any other > > language) that suits your personal preferences. > > It would

Re: New to Python - block grouping (spaces)

2015-04-18 Thread Marko Rauhamaa
Ben Finney : > If you only write programs that will only ever be read by you and > no-one else, feel free to maintain a fork of Python (or any other > language) that suits your personal preferences. It would be possible to define a canonical AST storage format. Then, your editor could "incarnate"

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Marko Rauhamaa
Michael Torrie : > There was a version of Python (compatible at a bytecode level) that did > implement braces for blocks. It was called pythonb, but it is now > defunct, understandably for lack of interest. http://www.perl.com/pub/2001/04/01/parrot.htm> LW: Sure. I'd probably write the progr

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Larry Hudson
On 04/17/2015 07:22 PM, Ben Finney wrote: BartC writes: (Actually *I* would quite like to know why languages don't have switchable syntax anyway to allow for people's personal preferences.) Which people's personal preferences? Are these the same people who have such passionate disagreement a

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Rustom Mody
On Saturday, April 18, 2015 at 6:49:30 AM UTC+5:30, Dan Sommers wrote: > On Fri, 17 Apr 2015 18:05:52 +0100, BartC wrote: > > > (Actually *I* would quite like to know why languages don't have > > switchable syntax anyway to allow for people's personal preferences.) > > You want LISP, the programm

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Ben Finney
BartC writes: > (Actually *I* would quite like to know why languages don't have > switchable syntax anyway to allow for people's personal preferences.) Which people's personal preferences? Are these the same people who have such passionate disagreement about tabs versus spaces? If you only writ

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Michael Torrie
On 04/17/2015 11:05 AM, BartC wrote: > He wanted to know if there was a simple syntax wrapper for it. That > seems reasonable enough. > > (Actually *I* would quite like to know why languages don't have > switchable syntax anyway to allow for people's personal preferences.) There was a version o

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Dan Sommers
On Fri, 17 Apr 2015 18:05:52 +0100, BartC wrote: > (Actually *I* would quite like to know why languages don't have > switchable syntax anyway to allow for people's personal preferences.) You want LISP, the programmable programming language. -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Chris Angelico
On Sat, Apr 18, 2015 at 3:05 AM, BartC wrote: > (Actually *I* would quite like to know why languages don't have switchable > syntax anyway to allow for people's personal preferences.) Why do it? What's the advantage of calling two different syntaxes one language? Simpler to just call them two sep

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Marko Rauhamaa
sohcahto...@gmail.com: > Can someone still write ugly code in Python? No doubt about it. But at > least code blocks will be easily deciphered. That's how I was originally convinced about Python: a coworker with a terrible C++ "handwriting" produced neat, legible code in Python. I'm still slightl

Re: New to Python - block grouping (spaces)

2015-04-17 Thread sohcahtoa82
On Friday, April 17, 2015 at 10:06:13 AM UTC-7, BartC wrote: > On 17/04/2015 17:28, Grant Edwards wrote: > > On 2015-04-17, Michael Torrie wrote: > > >> However, it may be that people recognized that you likely had made up > >> your mind already, and posted accordingly. > > > > I think most of us

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Rustom Mody
On Friday, April 17, 2015 at 10:36:13 PM UTC+5:30, BartC wrote: > (Actually *I* would quite like to know why languages don't have > switchable syntax anyway to allow for people's personal preferences.) Mess in programming syntax is because of html: http://blog.languager.org/2012/10/html-is-why-me

Re: New to Python - block grouping (spaces)

2015-04-17 Thread BartC
On 17/04/2015 17:28, Grant Edwards wrote: On 2015-04-17, Michael Torrie wrote: However, it may be that people recognized that you likely had made up your mind already, and posted accordingly. I think most of us just assumed he was just trolling and were playing along for the fun of it. Wh

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Grant Edwards
On 2015-04-17, Michael Torrie wrote: > On 04/16/2015 08:52 AM, Blake McBride wrote: >> Thanks for all the responses. I especially like the Pike pointer. >> To be clear: > [troll bait elided] > While it appears that you had already made up your mind about the > matter long before posting, and per

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Michael Torrie
On 04/16/2015 08:52 AM, Blake McBride wrote: > Thanks for all the responses. I especially like the Pike pointer. > To be clear: > > 1. I don't think languages should depend on invisible elements to > determine logic. > > 2. Having been an employer, it is difficult to force programmers to > use

Re: New to Python - block grouping (spaces)

2015-04-17 Thread Antoon Pardon
Op 16-04-15 om 19:10 schreef Steven D'Aprano: > On Thu, 16 Apr 2015 08:51 pm, BartC wrote: > >> On 16/04/2015 06:49, Steven D'Aprano wrote: >>> On Thursday 16 April 2015 14:07, Blake McBride wrote: Is there a utility that will allow me to write Python-like code that includes some block de

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Ron Adam
On 04/16/2015 01:41 PM, Steven D'Aprano wrote: >2. Having been an employer, it is difficult to force programmers to use >any particular editor or style. Different editors handle tabs and spaces >differently. This is all a bloody nightmare with Python. Do you really expect us to believe for

Re: New to Python - block grouping (spaces)

2015-04-16 Thread BartC
On 16/04/2015 18:10, Steven D'Aprano wrote: On Thu, 16 Apr 2015 08:51 pm, BartC wrote: On 16/04/2015 06:49, Steven D'Aprano wrote: On Thursday 16 April 2015 14:07, Blake McBride wrote: Is there a utility that will allow me to write Python-like code that includes some block delimiter that I

EditorConfig for cross-editor consistent code style (was: New to Python - block grouping (spaces))

2015-04-16 Thread Ben Finney
Chris Angelico writes: > If you're prepared to run a beautifier on your employees' code, you > should have no problem requiring that they adopt a syntactically-legal > style. For teams with a mixture of text editors in use, there are even tools nowadays to help everyone's text editor enforce con

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Serhiy Storchaka
On 16.04.15 08:49, Steven D'Aprano wrote: I'm not aware of any pre-processor tools for Python that will syntactically check that added braces match the indentation. Such a tool would be unPythonic: if they match, the braces are redundant and are not needed, and if they do not match, then the comp

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Rob Gaddi
On Thu, 16 Apr 2015 10:59:44 -0700, Rustom Mody wrote: > On Thursday, April 16, 2015 at 9:37:57 AM UTC+5:30, Blake McBride wrote: >> Greetings, >> >> I am new to Python. I am sorry for beating what is probably a dead >> horse but I checked the net and couldn't find the answer to my >> question.

Re: New to Python - block grouping (spaces)

2015-04-16 Thread memilanuk
On 04/16/2015 11:08 AM, alister wrote: On Thu, 16 Apr 2015 08:01:45 -0700, Blake McBride wrote: As a side note, I bought a few books on Python from Amazon for use on my Kindle. At least one of the books has the formatting for the Kindle messed up rendering the meaning of the program useless.

Re: New to Python - block grouping (spaces)

2015-04-16 Thread alister
On Thu, 16 Apr 2015 08:01:45 -0700, Blake McBride wrote: > As a side note, I bought a few books on Python from Amazon for use on my > Kindle. At least one of the books has the formatting for the Kindle > messed up rendering the meaning of the program useless. > > Case in point. > > Blake A poo

Re: New to Python - block grouping (spaces)yhoni

2015-04-16 Thread alister
On Thu, 16 Apr 2015 16:09:13 +0200, Antoon Pardon wrote: > On 04/16/2015 03:18 PM, alister wrote: > > >>> As is argueing against a real position instead of making something up. >>> Nobody is argueing for arbitrary indentation. >> May I suggest that you give it a try for a month, perhaps re-writi

Re: New to Python - block grouping (spaces)yhoni

2015-04-16 Thread alister
On Thu, 16 Apr 2015 14:44:15 +0100, BartC wrote: > On 16/04/2015 14:18, alister wrote: >> On Thu, 16 Apr 2015 13:07:22 +0200, Antoon Pardon wrote: > >>> Nobody is argueing for arbitrary indentation. >> >> May I suggest that you give it a try for a month, perhaps re-writing a >> small program you

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Rustom Mody
On Thursday, April 16, 2015 at 9:37:57 AM UTC+5:30, Blake McBride wrote: > Greetings, > > I am new to Python. I am sorry for beating what is probably a dead horse but > I checked the net and couldn't find the answer to my question. Kudos for making dead horses fly [33 posts in 13 hours and goin

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Tim Chase
On 2015-04-17 03:10, Steven D'Aprano wrote: > And there there was the time I edited some code written by my boss. > I intended to write a comment: > > # FIXME: this function is a little slow and should be optimized. > > but I hit the wrong key a couple of times and wrote: > > # This is a

Re: New to Python - block grouping (spaces)yhoni

2015-04-16 Thread Mark Lawrence
On 16/04/2015 14:44, BartC wrote: * I modify code a lot, adding and removing extra nested blocks all the time. My editor can't indent or un-indent blocks without a lot of manual typing. With block-delimited schemes, this isn't an issue, as temporary lack of correct indentation isn't crucial.

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Steven D'Aprano
On Fri, 17 Apr 2015 12:52 am, Blake McBride wrote: > Thanks for all the responses. I especially like the Pike pointer. To be > clear: > > 1. I don't think languages should depend on invisible elements to > determine logic. Icompletelyagreethatinvisibleelementsareterribleandalllanguagesshoulde

Re: New to Python - block grouping (spaces)

2015-04-16 Thread lconrad
-- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Steven D'Aprano
On Thu, 16 Apr 2015 08:51 pm, BartC wrote: > On 16/04/2015 06:49, Steven D'Aprano wrote: >> On Thursday 16 April 2015 14:07, Blake McBride wrote: > >>> Is there a utility that will allow me to write Python-like code that >>> includes some block delimiter that I can see, that converts the code >>>

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Grant Edwards
On 2015-04-16, Blake McBride wrote: > Thanks for all the responses. I especially like the Pike pointer. > To be clear: > > 1. I don't think languages should depend on invisible elements to > determine logic. I had the same attitude when I first tried Python 15 years ago. But, Python was t

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Chris Angelico
On Fri, Apr 17, 2015 at 12:52 AM, Blake McBride wrote: > 2. Having been an employer, it is difficult to force programmers to use any > particular editor or style. Different editors handle tabs and spaces > differently. This is all a bloody nightmare with Python. > > 3. Languages that use bra

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Jon Ribbens
On 2015-04-16, Blake McBride wrote: > 2. Having been an employer, it is difficult to force programmers to > use any particular editor or style. Different editors handle tabs > and spaces differently. This is all a bloody nightmare with Python. > > 3. Languages that use braces (or the like) can

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Mark Lawrence
On 16/04/2015 15:52, Blake McBride wrote: So, Python may be a cute language for you to use as an individual, but it is unwieldy in a real development environment. Thanks for this, one of the funniest comments I've read here in years. It's good to see that new people share the humourous side

Re: New to Python - block grouping (spaces)

2015-04-16 Thread memilanuk
On 04/16/2015 07:52 AM, Blake McBride wrote: Thanks for all the responses. I especially like the Pike pointer. To be clear: 1. I don't think languages should depend on invisible elements to determine logic. 2. Having been an employer, it is difficult to force programmers to use any particula

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Blake McBride
As a side note, I bought a few books on Python from Amazon for use on my Kindle. At least one of the books has the formatting for the Kindle messed up rendering the meaning of the program useless. Case in point. Blake -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Blake McBride
Thanks for all the responses. I especially like the Pike pointer. To be clear: 1. I don't think languages should depend on invisible elements to determine logic. 2. Having been an employer, it is difficult to force programmers to use any particular editor or style. Different editors handle

Re: New to Python - block grouping (spaces)yhoni

2015-04-16 Thread Antoon Pardon
On 04/16/2015 03:18 PM, alister wrote: > >> As is argueing against a real position instead of making something up. >> Nobody is argueing for arbitrary indentation. > May I suggest that you give it a try for a month, perhaps re-writing a > small program you already have in a pythonic style (don't

Re: New to Python - block grouping (spaces)

2015-04-16 Thread William Ray Wing
> On Apr 16, 2015, at 2:11 AM, Paul Rubin wrote: > > Steven D'Aprano writes: >> I'm aware that Coffeescript provides a brace-free wrapper around Javascript; >> I'm not aware of any wrapper that *adds* braces to a language without them. > > You're not old enough to remember Ratfor ;-) > -- >

Re: New to Python - block grouping (spaces)

2015-04-16 Thread Antoon Pardon
On 04/16/2015 03:41 PM, Chris Angelico wrote: > The case of a loop structure with its condition in the middle is one > that few languages support, so the physical structure has to be > something like: > > goto middle > while not condition: > more code > label middle > some code > > or >

Re: New to Python - block grouping (spaces)yhoni

2015-04-16 Thread Chris Angelico
On Thu, Apr 16, 2015 at 11:18 PM, alister wrote: > be warned you may find it creates (or increases ) an extreme dislike for > C & other languages that require braces & semicolons, it did for me > (especially the semi-colon!) I'd just like to add to this that the lack of semicolon in Python works

  1   2   >