Re: New to python - Just a question

2020-07-03 Thread Tim Chase
On 2020-07-03 10:09, Daley Okuwa via Python-list wrote: > Write an algorithm (choose the language you prefer) that given a > character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will > print out the list of characters appearing at least 2 times. In > this specific example, it would return {‘a’

Re: New to python - Just a question

2020-07-03 Thread Rhodri James
On 03/07/2020 11:09, Daley Okuwa via Python-list wrote: Please can someone help Write an algorithm (choose the language you prefer) that given a character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print out the list of characters appearing at least 2 times. In this specific example

Re: New to python - Just a question

2020-07-03 Thread David Lowry-Duda
Hello! > Please can someone help > > Write an algorithm (choose the language you prefer) that given a > character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print > out the list of characters appearing at least 2 times. In this > specific example, it would return {‘a’}. Afterwards, c

Re: (New to Python) Shopping List Code

2019-10-28 Thread Andrea D'Amore
On Mon, 28 Oct 2019 at 14:42, ferzan saglam wrote: > How can I stop this code when -1 is typed or at a maximum item count of ten. > At the moment the code seems to be in a infinite loop meaning it keeps on > asking for an entry until -1 is typed > item = input() > item != -1: Try these

Re: (New to Python) Shopping List Code

2019-10-28 Thread Peter J. Holzer
On 2019-10-28 06:42:46 -0700, ferzan saglam wrote: > How can I stop this code when -1 is typed or at a maximum item count of ten. I'm just rewriting that sentence in Python: > At the moment the code seems to be in a infinite loop meaning it keeps on > asking for an entry until -1 is typed > >

Re: (New to Python) Shopping List Code

2019-10-28 Thread Bev In TX
> On Oct 28, 2019, at 8:42 AM, ferzan saglam wrote: > > How can I stop this code when -1 is typed or at a maximum item count of ten. > At the moment the code seems to be in a infinite loop meaning it keeps on > asking for an entry until -1 is typed > > > total = 0

Re: (New to Python) Shopping List Code

2019-10-28 Thread Bev In TX
Bev > On Oct 28, 2019, at 8:42 AM, ferzan saglam wrote: > > How can I stop this code when -1 is typed or at a maximum item count of ten. > At the moment the code seems to be in a infinite loop meaning it keeps on > asking for an entry until -1 is typed > > > total = 0

Re: new to python - like to write a script with the libvirt-python 5.3.0 package

2019-06-03 Thread Cameron Simpson
On 03Jun2019 16:32, Dennis Lee Bieber wrote: On Mon, 3 Jun 2019 17:05:52 +0200 (CEST), "Lentes, Bernd" declaimed the following: I wrote a shellscript to create consistent images of the virtual machines each night, using the bash and virsh (the libvirt shell). Script is running fairly fine, bu

Re: New to Python and understanding problem

2018-02-03 Thread Michelle Konzack
Hello peter and *, Am 2018-02-03 hackte Peter J. Holzer in die Tasten: > On 2018-01-29 19:14:57 +0100, Michelle Konzack wrote: >> Am 2018-01-29 hackte Dan Stromberg in die Tasten: >> > I don't see blueman on pypi, so this is probably part of the package >> > you downloaded, and not something you n

Re: New to Python and understanding problem

2018-02-03 Thread Peter J. Holzer
On 2018-01-29 19:14:57 +0100, Michelle Konzack wrote: > Am 2018-01-29 hackte Dan Stromberg in die Tasten: > > I don't see blueman on pypi, so this is probably part of the package > > you downloaded, and not something you need to "pip3 install". > > I have Python 2.7 and 3.5 from the Debian GNU/Lin

Re: New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Good morning, Am 2018-01-30 hackte careenjosep...@gmail.com in die Tasten: > One contributing factor to this problem is the artificial environment that > online courses provide to students. Students are usually typing code into > a web page that contains instructions and hints. This is not how rea

Re: New to Python and understanding problem

2018-01-29 Thread careenjoseph36
One contributing factor to this problem is the artificial environment that online courses provide to students. Students are usually typing code into a web page that contains instructions and hints. This is not how real programming gets done. So when the course is over and it’s time to use a real

Re: New to Python and understanding problem

2018-01-29 Thread Peter Otten
Michelle Konzack wrote: > Hello *, > > because I am runing into problems with SOME python based programs, I the > this as opportunity to learn python (after ASM, C, BaSH, CP/M, COBOL, > JS, PHP and perl). > > > OK, I tried to install "blueman" (Bluetooth Manager) on my Debian 9.2 > (Stret

Re: New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Hello Dan, Am 2018-01-29 hackte Dan Stromberg in die Tasten: > I don't see blueman on pypi, so this is probably part of the package > you downloaded, and not something you need to "pip3 install". I have Python 2.7 and 3.5 from the Debian GNU/Linux repository installed I use the Stable (Stretch) v

Re: New to Python and understanding problem

2018-01-29 Thread MRAB
On 2018-01-29 17:01, Michelle Konzack wrote: [snip] I think, that I have found the error here: sys.path = [_dirname, os.path.join(_dirname, 'module', '.libs')] + sys.path because there is written in [ '/usr/lib/python-3.5/os.py' ]- To get a full path (w

Re: New to Python and understanding problem

2018-01-29 Thread Dan Stromberg
On Mon, Jan 29, 2018 at 9:01 AM, Michelle Konzack wrote: > OK, I tried to install "blueman" (Bluetooth Manager) on my Debian 9.2 > (Stretch system and discovered a problem: > > [ c 'blueman-applet' ]-- > Traceback (most recent call last): > File

Re: New to Python - Career question

2017-06-24 Thread J. Clarke
In article , larry.mart...@gmail.com says... > > On Tue, Jun 6, 2017 at 6:37 PM, Marko Rauhamaa wrote: > > pta...@gmail.com: > > > >> New to Python and have been at it for about a month now. I'm doing > >> well and like it very much. Considering a career change down the road > >> and have been w

Re: New to Python - Career question

2017-06-14 Thread Larry Martell
On Sat, Jun 10, 2017 at 3:51 AM, Paul Rubin wrote: > Larry Martell writes: >> I can tell they think I am old and they dismiss me right away. > > http://oldgeekjobs.com ? Cool! Thanks! Sharing with all my old nerdy friends. -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - Career question

2017-06-10 Thread Paul Rubin
Larry Martell writes: > I can tell they think I am old and they dismiss me right away. http://oldgeekjobs.com ? -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - Career question

2017-06-08 Thread Fred Stluka
On 6/6/17 5:39 PM, [1]pta...@gmail.com wrote: New to Python and have been at it for about a month now. I'm doing well and like it very much. Considering a career change down the road and have been wondering... What are the job prospects for a middle age entry level programmer. Just trying t

Re: New to Python - Career question

2017-06-07 Thread Matt
On Tuesday, June 6, 2017 at 3:37:56 PM UTC-7, Marko Rauhamaa wrote: > pta...@gmail.com: > > > New to Python and have been at it for about a month now. I'm doing > > well and like it very much. Considering a career change down the road > > and have been wondering... What are the job prospects for a

Re: New to Python - Career question

2017-06-06 Thread Larry Martell
On Tue, Jun 6, 2017 at 6:37 PM, Marko Rauhamaa wrote: > pta...@gmail.com: > >> New to Python and have been at it for about a month now. I'm doing >> well and like it very much. Considering a career change down the road >> and have been wondering... What are the job prospects for a middle age >> en

Re: New to Python - Career question

2017-06-06 Thread Marko Rauhamaa
pta...@gmail.com: > New to Python and have been at it for about a month now. I'm doing > well and like it very much. Considering a career change down the road > and have been wondering... What are the job prospects for a middle age > entry level programmer. Just trying to get a better understandin

Re: New to Python - Career question

2017-06-06 Thread Larry Martell
On Tue, Jun 6, 2017 at 5:39 PM, wrote: > New to Python and have been at it for about a month now. I'm doing well and > like it very much. Considering a career change down the road and have been > wondering... What are the job prospects for a middle age entry level > programmer. Just trying to

Re: New to python and programming

2017-05-18 Thread Grant Edwards
On 2017-05-17, BT wrote: > I am fairly new to programming. I was just trying to understand how > this group works. Am i allowed to ask any questions that I may have > when i get stuck? Certainly. For best results, post small pieces of code that demonstrate your problem/question (cut and paste f

Re: New to python and programming

2017-05-18 Thread breamoreboy
On Wednesday, May 17, 2017 at 9:00:08 PM UTC+1, BT wrote: > Hi guys, > I am fairly new to programming. I was just trying to understand how this > group works. Am i allowed to ask any questions that I may have when i get > stuck? I mean is this group for new programmers as well..? > Thanks You ca

Re: New to python and programming

2017-05-17 Thread Ray Cote
On Wed, May 17, 2017 at 4:43 PM, justin walters wrote: > On Wed, May 17, 2017 at 12:59 PM, BT wrote: > > > Hi guys, > > I am fairly new to programming. I was just trying to understand how this > > group works. Am i allowed to ask any questions that I may have when i get > > stuck? I mean is this

Re: New to python and programming

2017-05-17 Thread Ben Bacarisse
BT writes: > I am fairly new to programming. I was just trying to understand how > this group works. Am i allowed to ask any questions that I may have > when i get stuck? I mean is this group for new programmers as well..? Welcome. Yes, it's for pretty much any questions about Python programmin

Re: New to python and programming

2017-05-17 Thread Chris Angelico
On Thu, May 18, 2017 at 5:59 AM, BT wrote: > I am fairly new to programming. I was just trying to understand how this > group works. Am i allowed to ask any questions that I may have when i get > stuck? I mean is this group for new programmers as well..? > Hi! Yes, it is, but if you're really R

Re: New to python and programming

2017-05-17 Thread justin walters
On Wed, May 17, 2017 at 12:59 PM, BT wrote: > Hi guys, > I am fairly new to programming. I was just trying to understand how this > group works. Am i allowed to ask any questions that I may have when i get > stuck? I mean is this group for new programmers as well..? > Thanks > -- > https://mail.p

Re: New to python

2016-10-18 Thread Chris Warrick
On 17 October 2016 at 21:51, Bill Cunningham wrote: > I just installed python I might start with 3. But there is version 2 out > too. So far I can '3+4' and get the answer. Nice. I typed the linux man page > and got a little info. So to learn this language is there an online > tutorial? I am i

Re: New to python

2016-10-17 Thread justin walters
On Mon, Oct 17, 2016 at 12:51 PM, Bill Cunningham wrote: > I just installed python I might start with 3. But there is version 2 out > too. So far I can '3+4' and get the answer. Nice. I typed the linux man > page > and got a little info. So to learn this language is there an online > tutorial? I

Re: New to python

2016-10-17 Thread breamoreboy
On Monday, October 17, 2016 at 8:51:52 PM UTC+1, Bill Cunningham wrote: > I just installed python I might start with 3. But there is version 2 out > too. So far I can '3+4' and get the answer. Nice. I typed the linux man page > and got a little info. So to learn this language is there an online

Re: New to python

2016-10-17 Thread Jan Erik Moström
On 17 Oct 2016, at 21:51, Bill Cunningham wrote: I just installed python I might start with 3. But there is version 2 out too. So far I can '3+4' and get the answer. Nice. I typed the linux man page and got a little info. So to learn this language is there an online tutorial? I am interest

Re: New to python

2016-10-17 Thread Skip Montanaro
> So to learn this language is there an online > tutorial? Yup, go to https://docs.python.org/3/ and check out the tutorial links. Also, if you want useful replies in the future, please provide a valid email address. A private reply to this particular question would have been better than bombing t

Re: new to python, help please !!

2015-11-12 Thread Denis McMahon
On Wed, 11 Nov 2015 08:34:30 -0800, Anas Belemlih wrote: > i am a beginning programmer, i am trying to write a simple code to > compare two character sets in 2 seperate files. ( 2 hash value files > basically) Why? If you simply wish to compare two files, most operating systems provide executa

Re: new to python, help please !!

2015-11-12 Thread Denis McMahon
On Thu, 12 Nov 2015 17:55:33 +, Quivis wrote: > On Thu, 12 Nov 2015 13:58:35 +1100, Steven D'Aprano wrote: > >> horribly inefficient > > Assuming it was md5 values, who cares? Those are small. A file of 160 million md5 hashes as 32 character hex strings is a huge file. Your method calculat

Re: new to python, help please !!

2015-11-12 Thread Peter Otten
Tim Chase wrote: > On 2015-11-12 15:56, Peter Otten wrote: >> Tim Chase wrote: >> >> > with open("file1.md5") as a, open("file2.md5") as b: >> > for s1, s2 in zip(a, b): >> > if s1 != s2: >> > print("Files differ") >> >> Note that this will not detect extra lines in one of th

Re: new to python, help please !!

2015-11-12 Thread Tim Chase
On 2015-11-12 15:56, Peter Otten wrote: > Tim Chase wrote: > > > with open("file1.md5") as a, open("file2.md5") as b: > > for s1, s2 in zip(a, b): > > if s1 != s2: > > print("Files differ") > > Note that this will not detect extra lines in one of the files. > I recommend that

Re: new to python, help please !!

2015-11-12 Thread Peter Otten
Tim Chase wrote: > with open("file1.md5") as a, open("file2.md5") as b: > for s1, s2 in zip(a, b): > if s1 != s2: > print("Files differ") Note that this will not detect extra lines in one of the files. I recommend that you use itertools.zip_longest (izip_longest in Python 2)

Re: new to python, help please !!

2015-11-12 Thread paul.hermeneutic
Would some form of subprocess.Popen() on cmp or fc /b be easier? On Nov 12, 2015 7:13 AM, "Tim Chase" wrote: > On 2015-11-12 08:21, Marko Rauhamaa wrote: > > And if you really wanted to compare two files that are known to > > contain MD5 checksums, the simplest way is: > > > >with open('f1.md

Re: new to python, help please !!

2015-11-12 Thread Tim Chase
On 2015-11-12 08:21, Marko Rauhamaa wrote: > And if you really wanted to compare two files that are known to > contain MD5 checksums, the simplest way is: > >with open('f1.md5') as f1, open('f2.md5') as f2: >if f1.read() == f2.read(): >... >else: >... T

Re: new to python, help please !!

2015-11-11 Thread Marko Rauhamaa
Steven D'Aprano : > On Thursday 12 November 2015 04:48, Quivis wrote: > >> On Wed, 11 Nov 2015 08:34:30 -0800, Anas Belemlih wrote: >> >>> md5 >> >> If those are md5 values stored inside files, wouldn't it be easier to >> just hash them? >> >> import hashlib >> >> m1 = hashlib.sha224(open('f1'

Re: new to python, help please !!

2015-11-11 Thread Steven D'Aprano
On Thursday 12 November 2015 04:48, Quivis wrote: > On Wed, 11 Nov 2015 08:34:30 -0800, Anas Belemlih wrote: > >> md5 > > If those are md5 values stored inside files, wouldn't it be easier to > just hash them? > > import hashlib > > m1 = hashlib.sha224(open('f1').read()).hexdigest() > m2 = has

Re: new to python, help please !!

2015-11-11 Thread Ben Finney
Anas Belemlih writes: > i am a beginning programmer, i am trying to write a simple code to > compare two character sets in 2 seperate files. ( 2 hash value files > basically) Welcome, and congratulations on arriving at Python for your programming! As a beginning programmer, you will benefit f

Re: new to python, help please !!

2015-11-11 Thread Tim Chase
On 2015-11-11 08:34, Anas Belemlih wrote: > i am a beginning programmer, i am trying to write a simple code > to compare two character sets in 2 seperate files. ( 2 hash value > files basically) idea is: open both files, measure the length of > the loop on. > > if the length doesn't match, ==

Re: new to python, help please !!

2015-11-11 Thread John Gordon
In <93aef8e5-3d6f-41f4-a625-cd3c20076...@googlegroups.com> Anas Belemlih writes: > i=0 > s1=line1[i] > s2=line2[i] > count = 0 > if number1 != number2: > print " hash table not the same size" > else: > while count < number1: > if s1 == s2: > print " character", lin

Re: New to Python and setting up

2015-10-18 Thread dieter
Glenn Schultz writes: > ... > Following the example of Ivan I have setup A folder structure. My > understand is that if each folder has an __init__.py From what it is > considered a module. Have I set this up correctly? An "__init__.py" in a folder used to indicate that this folder is a

Re: New to python

2015-07-20 Thread Arthi Vigneshwari
Hey David, Yeah,I had an overall look at https://www.python.org/about/gettingstarted/! Let me dig deep into the websites you shared me with! Thanks, Arthi On Mon, Jul 20, 2015 at 1:19 PM, David Palao wrote: > 2015-07-20 7:20 GMT+02:00 Arthi Vigneshwari : > > Hi, > > Am intereste

Re: New to python

2015-07-20 Thread David Palao
2015-07-20 7:20 GMT+02:00 Arthi Vigneshwari : > Hi, > Am interested to learn python!Can you please guide me how to start with > python which will help in my selenium automation? > > Regards, > Arthi > > -- > https://mail.python.org/mailman/listinfo/python-list > Hi, If you enter "learning python

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

  1   2   3   4   5   >