Pythons for .Net

2016-07-24 Thread Steven D'Aprano
Yes, I said Pythons plural :-) For those wanting to use Python on .Net or Mono, there is some good news. Firstly, the venerable old "Python for .Net" project is still alive, and now supports up to Python 3.5 on .Net or Mono. PythonNet, as this is known, integrates the regular CPython interpreter

Re: Why not allow empty code blocks?

2016-07-24 Thread Steven D'Aprano
On Mon, 25 Jul 2016 01:20 pm, Rustom Mody wrote: >> so ultimately, it all comes down to testing anyway. > > All?? Ultimately, yes. It all comes down to testing. How else do you know that your program to flernge the widget *actually* flernges the widget or not? > There is a famous quote by Dijk

Re: Why not allow empty code blocks?

2016-07-24 Thread Rustom Mody
On Monday, July 25, 2016 at 8:59:10 AM UTC+5:30, Chris Angelico wrote: > On Mon, Jul 25, 2016 at 1:20 PM, Rustom Mody wrote: > >> so ultimately, it all comes down to testing anyway. > > > > All?? > > > > There is a famous quote by Dijkstra: > > «Testing shows the presence, not the absence of bugs»

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Mon, Jul 25, 2016 at 1:20 PM, Rustom Mody wrote: >> so ultimately, it all comes down to testing anyway. > > All?? > > There is a famous quote by Dijkstra: > «Testing shows the presence, not the absence of bugs» > > Or if you prefer things of a more ‘practical’ (so-called_ nature: > http://www.t

Re: Why not allow empty code blocks?

2016-07-24 Thread Rustom Mody
On Monday, July 25, 2016 at 8:42:21 AM UTC+5:30, Chris Angelico wrote: > On Mon, Jul 25, 2016 at 12:48 PM, Michael Torrie wrote: > > Far more often I'm bitten by the dynamic nature of Python (would happen > > in any dynamic language). I'll be using a particular member attribute > > which I acciden

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Mon, Jul 25, 2016 at 12:48 PM, Michael Torrie wrote: > Far more often I'm bitten by the dynamic nature of Python (would happen > in any dynamic language). I'll be using a particular member attribute > which I accidentally misspell somewhere and sometimes that results in > silent failure. Some

Re: Why not allow empty code blocks?

2016-07-24 Thread Michael Torrie
On 07/24/2016 07:14 PM, BartC wrote: > I've done little Python coding but still, having to use kid gloves for > indents does figure quite a bit in that. > > I can give some more examples but I'll probably be told that I'm using > the wrong tools! Which suggest there is a problem, but the effort

Re: Can math.atan2 return INF?

2016-07-24 Thread Rustom Mody
On Thursday, June 30, 2016 at 1:55:18 PM UTC+5:30, Steven D'Aprano wrote: > On Thursday 30 June 2016 12:13, Rustom Mody wrote: > > > In particular the question: "Are real numbers really real?" is where it > > starts off... http://blog.languager.org/2015/03/cs-history-0.html > > The pre-history of

Re: Why not allow empty code blocks?

2016-07-24 Thread Steven D'Aprano
On Mon, 25 Jul 2016 08:13 am, BartC wrote: > A solid end-of-block symbol (as you get with 'else' and 'except' because > then you KNOW that's the end of that block) would have been welcome with > the Python indent scheme. A solid end-of-block symbol would have been entire redundant and unnecessary

Re: Why not allow empty code blocks?

2016-07-24 Thread Ben Finney
BartC writes: > On 25/07/2016 01:40, Gregory Ewing wrote: > > What's your experience? How often has this caused you trouble, and > > what proportion is it of all the Python programming you've done? > > I've done little Python coding Then you are not in a position to make the prnouncements about

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 25/07/2016 01:40, Gregory Ewing wrote: BartC wrote: So I still think it's fragile, meaning you have to take a lot of extra care. The practical experience of a very large number of Python programmers suggests that it requires very little additional care over and above that normally require

Re: Why not allow empty code blocks?

2016-07-24 Thread Gregory Ewing
BartC wrote: (They don't need to be elaborate to start being confusing. Take 'int *a[]' and 'int (*a)[]'; one of these is an array of pointers, the other a pointer to an array. Quite different! But which is which? Where have you seen 'int (*a)[]' used? I don't think I've ever seen any real-lif

Re: Why not allow empty code blocks?

2016-07-24 Thread Rustom Mody
On Monday, July 25, 2016 at 1:33:48 AM UTC+5:30, BartC wrote: > On 24/07/2016 20:00, Chris Angelico wrote: > > On Mon, Jul 25, 2016 at 4:14 AM, BartC wrote: > > > A skilled craftsman in any field will choose to use quality tools. > > Materials (ie. languages) are important too. > > > So why do

Re: Why not allow empty code blocks?

2016-07-24 Thread Gregory Ewing
BartC wrote: On 24/07/2016 14:24, Chris Angelico wrote: No, it's an example of how *mixing tabs and spaces* can go wrong. And in fact will always go wrong unless you legislate the width of a tab. That's easy to say. How do you actually ensure that they aren't mixed? The software may not high

Re: New to programming and asking about accessibility with jaws screen reader.

2016-07-24 Thread Jacob Kruger
Presume you're talking about python idle IDE? Forget it, and, like said, I use edSharp programmers text editor, and work from command line/console when want to test/run my code. Stay well Jacob Kruger Blind Biker Skype: BlindZA "Resistance is futile, but, acceptance is versatile..." On 20

Re: New to programming and asking about accessibility with jaws screen reader.

2016-07-24 Thread Jacob Kruger
What part is not accessible? Ask since while haven't really gone past 3.4 and 3.5.1, at times, I generally work with specific text/code editors, and the command line window, and this works fine for me with both NVDA, and jaws 17 at times. Stay well Jacob Kruger Blind Biker Skype: BlindZA "R

Re: Depending on enum34 from a library

2016-07-24 Thread Ben Finney
Vasiliy Faronov writes: > If I simply depend on enum34, it will install a module named `enum` > even in Python 3.4+ environments, and that could shadow the stdlib > module. As far as I know, ‘enum34’ is intended to provide all the same features as the latest Python 3 standard library's ‘enum’ li

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 24/07/2016 22:08, Chris Angelico wrote: On Mon, Jul 25, 2016 at 6:03 AM, BartC wrote: Perhaps because I prefer to use my own languages and I don't have anyone writing the specialist tools for me that would be necessary. So because you've chosen to use your own languages, you are frustrat

Re: New to programming and asking about accessibility with jaws screen reader.

2016-07-24 Thread Chris Angelico
On Mon, Jul 25, 2016 at 6:04 AM, josphine said wrote: > I have downloaded python3.6 and found it is not accessible with jaws 17. > So, is there any skripts for jaws for that? Exactly what did you download, and where from? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Mon, Jul 25, 2016 at 6:03 AM, BartC wrote: > On 24/07/2016 20:00, Chris Angelico wrote: >> >> On Mon, Jul 25, 2016 at 4:14 AM, BartC wrote: > > >> A skilled craftsman in any field will choose to use quality tools. > > Materials (ie. languages) are important too. Materials, tools, same differe

RE: New to programming and asking about accessibility with jaws screen reader.

2016-07-24 Thread Joseph Lee
Hi, How are you running Python - via Command Prompt, perhaps? It might be better to ask a list like program-l (a dedicated programming list for blind devs). Cheers, Joseph -Original Message- From: Python-list [mailto:python-list-bounces+joseph.lee22590=gmail@python.org] On Behalf Of jo

Depending on enum34 from a library

2016-07-24 Thread Vasiliy Faronov
Hi all, I'm building a Python library where I want to use Python 3.4-style enums. Because I need to support Python 2.7, I'm considering using enum34 [1]. But I'm not sure how to do this: If I simply depend on enum34, it will install a module named `enum` even in Python 3.4+ environments, and that

New to programming and asking about accessibility with jaws screen reader.

2016-07-24 Thread josphine said
Hello, I have downloaded python3.6 and found it is not accessible with jaws 17. So, is there any skripts for jaws for that? Or any suggestions? Every guidance will highly appreciated. Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 24/07/2016 20:00, Chris Angelico wrote: On Mon, Jul 25, 2016 at 4:14 AM, BartC wrote: A skilled craftsman in any field will choose to use quality tools. Materials (ie. languages) are important too. So why do you use "dumb editor" as a line of argument, rather than getting a smarter edi

BASTARD NAZIST MAFIOSO SALVATORE SAL GALATIOTO WANTS TO GET MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + COLOMBIAN & ITALIAN AMERICAN MAFIA. THESE ARE " THE MISTERI

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
BASTARD NAZIST MAFIOSO SALVATORE SAL GALATIOTO WANTS TO GET MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + COLOMBIAN & ITALIAN AMERICAN MAFIA. THESE ARE " THE MISTERIOUS CHINESE FUNDS" HE IS BRAYING HE HAS FOR MILAN! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

NAZIST MAFIOSO SAL GALATIOTO WANTS TO GET AC MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE "THE MISTERIOUS CHINESE FUNDS"

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
NAZIST MAFIOSO SAL GALATIOTO WANTS TO GET AC MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE "THE MISTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE, ASSASSIN SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

STINKY MAFIOSO SAL GALATIOTO WANTS TO GET AC MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE "THE MISTERIOUS CHINESE FUNDS"

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
STINKY MAFIOSO SAL GALATIOTO WANTS TO GET AC MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE "THE MISTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE, ASSASSIN SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

BASTARD MAFIOSO SALVATORE GALATIOTO WANTS TO GET MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + ITALIANAMERICAN MAFIA! THESE ARE " THE MISTERIOUS CHINESE FUNDS" HE HA

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
BASTARD MAFIOSO SALVATORE GALATIOTO WANTS TO GET MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + ITALIANAMERICAN MAFIA! THESE ARE " THE MISTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE ASSASSIN NAZIST SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

NAZIST MAFIOSO SALVATORE GALATIOTO WANTS TO GET MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + ITALIANAMERICAN MAFIA! THESE ARE " THE MYSTERIOUS CHINESE FUNDS" HE HAS

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
NAZIST MAFIOSO SALVATORE GALATIOTO WANTS TO GET MILAN OUT OF EXTREMELY KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + ITALIANAMERICAN MAFIA! THESE ARE " THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE ASSASSIN MAFIOSO SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

BASTARD CRIMINAL SALVATORE GALATIOTO WANTS TO GET MILAN OUT OF KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + ITALIAN AMERICAN MAFIA! THESE ARE "THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR PED

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
BASTARD CRIMINAL SALVATORE GALATIOTO WANTS TO GET MILAN OUT OF KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + ITALIAN AMERICAN MAFIA! THESE ARE "THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE ASSASSIN NAZIST MAFIOSO SILVIO BERLUSCONI!! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

FUCKING CRIMINAL SALVATORE GALATIOTO WANTS TO GET MILAN OUT OF KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + ITALIAN AMERICAN MAFIA! THESE ARE "THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR PED

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
FUCKING CRIMINAL SALVATORE GALATIOTO WANTS TO GET MILAN OUT OF KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) + ITALIAN AMERICAN MAFIA! THESE ARE "THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE ASSASSIN NAZIST MAFIOSO SILVIO BERLUSCONI!! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

BASTARD MAFIOSO NICHOLAS GANCIKOFF (SOLAR) WANTS TO GET MILAN OUT OF KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE "THE MISTERIOUS CHINESE FUNDS

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
BASTARD MAFIOSO NICHOLAS GANCIKOFF (SOLAR) WANTS TO GET MILAN OUT OF KILLING CASH FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE "THE MISTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE ASSASSIN SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

FUCKING BASTARD NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE " THE MYSTERIOUS CHINESE FUNDS

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
FUCKING BASTARD NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE " THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE ASSASSIN SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

BASTARD MAFIOSO NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIAN AMERICAN MAFIA! THESE ARE "THE MYSTERIOUS CHINESE FUNDS

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
BASTARD MAFIOSO NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIAN AMERICAN MAFIA! THESE ARE "THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE ASSASSIN SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

SON OF A BITCH NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIAN AMERICAN MAFIA! THESE ARE " THE MYSTERIOUS CHINESE FUNDS

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
SON OF A BITCH NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIAN AMERICAN MAFIA! THESE ARE " THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR PEDOPHILE ASSASSIN SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

SON OF A WHORE NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIAN AMERICAN MAFIA! THESE ARE " THE MYSTERIOUS CHINESE FUNDS

2016-07-24 Thread GIOVANNI ZIBORDI COBRAF MODENA via Python-list
SON OF A WHORE NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE), COLOMBIAN & ITALIAN AMERICAN MAFIA! THESE ARE " THE MYSTERIOUS CHINESE FUNDS" HE HAS FOR ASSASSIN PEDOPHILE SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN S

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Mon, Jul 25, 2016 at 4:14 AM, BartC wrote: > OK. I understand that it is not possible to point out any kind of weakness > of a language (any language not just Python!) because the counter-argument > is always going to be about: > > Use syntax highlighting, use a smart editor, use a version cont

Re: Convert from unsigned long long to PyLong

2016-07-24 Thread INADA Naoki
Thank you for reporting this issue. I'll fix it in next release of mysqlclient (MySQL-python has not been maintained for these years. Please use mysqlclient. It supports Python 3.) On Fri, Jul 22, 2016 at 3:01 PM, Tian JiaLin wrote: > HI There, > > I'm using MySQLdb as the MySQL client. Recent

Re: Why not allow empty code blocks?

2016-07-24 Thread alister
On Sun, 24 Jul 2016 19:14:10 +0100, BartC wrote: > On 24/07/2016 15:51, Chris Angelico wrote: >> On Mon, Jul 25, 2016 at 12:44 AM, BartC wrote: >>> Your attention is diverted, you're doing something on your desk, but >>> you hit one of the keys by mistake. You might have pressed Delete or >>> you

Re: Why not allow empty code blocks?

2016-07-24 Thread Jonathan Hayward
I might point out something that captures something about pass: it is made to do extra duty in web2py, which is meant to shield students from some of the more preventable complexities of a LUM CLI, and you don't easily indent code the way that Vim and Emacs, let alone a full IDE besides the IDE nat

Re: Why not allow empty code blocks?

2016-07-24 Thread neceros
On Sunday, July 24, 2016 at 6:09:40 AM UTC-7, BartC wrote: > On 24/07/2016 11:45, BartC wrote: > > On 24/07/2016 11:35, BartC wrote: > > > 'end' to terminate a block can be emulated of course: > > > > end=0 > > > > def fn(a): > > if a<=1: > > return 1 > > else: > > return fn(a-

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 24/07/2016 15:51, Chris Angelico wrote: On Mon, Jul 25, 2016 at 12:44 AM, BartC wrote: Your attention is diverted, you're doing something on your desk, but you hit one of the keys by mistake. You might have pressed Delete or you might not. You look at the screen which has a 5000-line program

SON OF WHORE NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE "THE MYSTERIOUS CHINESE FUNDS" HE

2016-07-24 Thread GIACOMO ZUCCO BITCOIN TECHNOLOGY CONSULTANT
SON OF WHORE NICHOLAS GANCIKOFF WANTS TO GET MILAN OUT OF KILLING CASH COMING FROM RUSSIAN MAFIA, CHINESE MAFIA (TRIADE) COLOMBIAN & ITALIANAMERICAN MAFIA! THESE ARE "THE MYSTERIOUS CHINESE FUNDS" HE HAS X ASSASSIN, PEDOPHILE, NAZI SILVIO BERLUSCONI! I'M A VERY HIGH DEGREE FREEMASON AND I CAN

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Mon, Jul 25, 2016 at 12:44 AM, BartC wrote: > Your attention is diverted, you're doing something on your desk, but you hit > one of the keys by mistake. You might have pressed Delete or you might not. > You look at the screen which has a 5000-line program open, and you see this > (borrowing you

Re: Detecting the trivial can be non-trivial (was Why not allow empty code blocks?)

2016-07-24 Thread Rustom Mody
On Sunday, July 24, 2016 at 3:45:40 PM UTC+5:30, Ben Bacarisse wrote: > Rustom Mody writes: > > > For a long time the re → dfa transformation went and was taught the > > laborious > > route: > > re → nfa-with-ε-transitions → nfa-without-ε-transitions → dfa > > > > https://en.wikipedia.org/wiki/T

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 24/07/2016 13:17, Steven D'Aprano wrote: On Sun, 24 Jul 2016 08:35 pm, BartC wrote: Given an otherwise correctly typed program that compiles with no errors, then it is very easy (if Backspace or Delete is inadvertently pressed for example), for an indent to disappear without your noticing,

Re: Why not allow empty code blocks?

2016-07-24 Thread Steven D'Aprano
On Mon, 25 Jul 2016 12:05 am, BartC wrote: >> No, it's an example of how *mixing tabs and spaces* can go wrong. And >> in fact will always go wrong unless you legislate the width of a tab. > > That's easy to say. How do you actually ensure that they aren't mixed? > The software may not highlight

Re: Why not allow empty code blocks?

2016-07-24 Thread Marco Sulla via Python-list
On 24 July 2016 at 14:48, Chris Angelico wrote: > Maybe the people who are most worried about this can enact a > simple rule: no dedent without a blank line? That can easily be > verified by a script, and it'd protect against most of the given > examples. It's not too much effort (after any reason

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 24/07/2016 14:24, Chris Angelico wrote: On Sun, Jul 24, 2016 at 11:09 PM, BartC wrote: Actually this is a good example of how tabs can go wrong (and how the tab system /is/ fragile - sorry but it is). I almost certainly wrote the above using 4 and 8 spaces for the tabs, except for the 'retu

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Sun, Jul 24, 2016 at 11:11 PM, Marco Sulla wrote: > On 24 July 2016 at 14:48, Chris Angelico wrote: >> Maybe the people who are most worried about this can enact a >> simple rule: no dedent without a blank line? That can easily be >> verified by a script, and it'd protect against most of the g

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Sun, Jul 24, 2016 at 11:09 PM, BartC wrote: > Actually this is a good example of how tabs can go wrong (and how the tab > system /is/ fragile - sorry but it is). > > I almost certainly wrote the above using 4 and 8 spaces for the tabs, except > for the 'return 1' where I must have used an actua

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 24/07/2016 11:45, BartC wrote: On 24/07/2016 11:35, BartC wrote: 'end' to terminate a block can be emulated of course: end=0 def fn(a): if a<=1: return 1 else: return fn(a-1) end end Actually this is a good example of how tabs can go wrong (and how the tab syste

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Sun, Jul 24, 2016 at 10:17 PM, Steven D'Aprano wrote: > (Do other professions make arguments like this? Do carpenters, say, argue > against nail guns because "well if you accidentally hold a loaded nail gun > to your head, then press the trigger, bad things will happen"? Or is it > just program

Re: Why not allow empty code blocks?

2016-07-24 Thread Joel Goldstick
On Sun, Jul 24, 2016 at 8:17 AM, Steven D'Aprano wrote: > On Sun, 24 Jul 2016 08:35 pm, BartC wrote: > >> I didn't want to get into this subject again, but Python's indentation >> scheme is fragile. > > *shrug* > > Okay, it's fragile. In 20 (give or take a couple) years of programming in > Python,

Re: Why not allow empty code blocks?

2016-07-24 Thread Steven D'Aprano
On Sun, 24 Jul 2016 08:35 pm, BartC wrote: > I didn't want to get into this subject again, but Python's indentation > scheme is fragile. *shrug* Okay, it's fragile. In 20 (give or take a couple) years of programming in Python, do you know how many times this fragility has been an *actual* proble

Re: Why not allow empty code blocks?

2016-07-24 Thread Chris Angelico
On Sun, Jul 24, 2016 at 8:45 PM, BartC wrote: > 'end' to terminate a block can be emulated of course: > > end=0 > > def fn(a): > if a<=1: > return 1 > else: > return fn(a-1) > end > end > > And in this example it wouldn't impact on performance as it is not > evaluated.

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 24/07/2016 11:35, BartC wrote: On 23/07/2016 16:55, Steven D'Aprano wrote: In any case, using "end" instead of "pass" is a poor tradeoff. Instead of needing to use "pass" (say) one time in a thousand when it is needed, you would need to use "end" 999 times in a thousand when it *isn't* need

Re: Why not allow empty code blocks?

2016-07-24 Thread BartC
On 23/07/2016 16:55, Steven D'Aprano wrote: On Sun, 24 Jul 2016 12:06 am, BartC wrote: pass can only do so much. If doesn't help here: for x in sequence: print("Something") print("Something else") Was the second print meant to be indented as well or not? True. But once you start w

Re: Detecting the trivial can be non-trivial (was Why not allow empty code blocks?)

2016-07-24 Thread Ben Bacarisse
Rustom Mody writes: > For a long time the re → dfa transformation went and was taught the laborious > route: > re → nfa-with-ε-transitions → nfa-without-ε-transitions → dfa > > https://en.wikipedia.org/wiki/Thompson's_construction > https://en.wikipedia.org/wiki/Powerset_construction > > Now ther