Re: syntax difference (type hints)

2018-06-18 Thread Gregory Ewing
Steven D'Aprano wrote: Sometimes the type system cannot infer the type of a variable or name, and needs a hint from the author. Or it can infer it, but is unable to produce intelligible error messages without some intermediate signposts to follow. -- Greg --

[issue33839] IDLE tooltips.py: refactor and add docstrings and tests

2018-06-18 Thread Tal Einat
Tal Einat added the comment: > What do you think of changing 'ToolTip' to 'Tooltip'? +1, I'll change it. > TclError from widget.destroy suggests that we *might* be able to cleanup > better. The try/except clauses which are hard to test are used since the order in which widgets are

Re: syntax difference

2018-06-18 Thread Dan Stromberg
On Mon, Jun 18, 2018 at 10:08 PM, Chris Angelico wrote: > On Tue, Jun 19, 2018 at 1:46 PM, Dan Stromberg > wrote: > > Great languages are small but extensible, easy to read, and don't require > > learning a lot before you can get started writing code or reading someone > > else's code. > > > >

Re: syntax difference

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 1:46 PM, Dan Stromberg wrote: > Great languages are small but extensible, easy to read, and don't require > learning a lot before you can get started writing code or reading someone > else's code. > > Great languages: C and Scheme. And Python. > > But isn't Lua smaller

[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks @prawin for the confirmation. There is a mailing list discussion at https://groups.google.com/forum/#!topic/python-ideas/Ny1RN9wY0cI and it seems this is related to Thai language locale. Feel free to add in if you have any more input on if

[issue33855] IDLE: Minimally test every non-startup module.

2018-06-18 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +7389 stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-18 Thread Prawin Phichitnitikorn
Prawin Phichitnitikorn added the comment: Sorry for late Reply, But for me I'm resolve by adding # cp874 codec '874': 'cp874', to alias.py file -- ___ Python tracker

[issue33855] IDLE: Minimally test every non-startup module.

2018-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Spinoffs: change rstrip.RstripExtension to Rstrip change stackviewer.StackBrowser to accept exception -- stage: patch review -> test needed ___ Python tracker

Re: syntax difference

2018-06-18 Thread Dan Stromberg
On Mon, Jun 18, 2018 at 5:52 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Mon, 18 Jun 2018 21:03:14 +0100, Bart wrote: > > > In the case of Python, it is > > already so big and has so many features crammed in that adding type > > hints probably makes little difference.

Re: syntax difference (type hints)

2018-06-18 Thread Dan Stromberg
On Mon, Jun 18, 2018 at 5:45 PM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > On Mon, 18 Jun 2018 14:57:30 +, Schachner, Joseph wrote: > > I believe the proposed type hints are only necessary > > for function definitions, > > What is the basis of this belief? How much

[issue33872] doc Add list access time to list definition

2018-06-18 Thread Xiang Zhang
Xiang Zhang added the comment: I concur with INADA. I don't prefer to add such implementation choice in definition. As for glossary, it may be unnecessary either but since it's already there, I don't think it needs to be removed. -- nosy: +xiang.zhang

Re: Is it possible to call a class but without a new instance created?

2018-06-18 Thread Ben Finney
Jach Fong writes: > Although it passed the first examination, I have no idea if it can > work correctly in the real application:-) Neither do I. What is the real-world problem you are trying to solve? Why do you think this (and not some more idiomatic Python feature) is needed for solving that

Re: Is it possible to call a class but without a new instance created?

2018-06-18 Thread Jach Fong
Ben Finney at 2018/6/18 PM 03:29 wrote: Jach Fong writes: I also make a test of my own and it fails too. class A: ... objs = [] ... def __init__(self, exists=False): ... if exists: self = self.objs[0] The function parameters (bound here to the names ‘self’, ‘exists’)

Re: Folk etymology, was Re: Python list vs google group

2018-06-18 Thread Gene Heskett
On Monday 18 June 2018 19:24:14 Jim Lee wrote: > On 06/18/2018 04:09 PM, Gregory Ewing wrote: > > Peter Otten wrote: > >> "folk etymology" would be the retrofitting of the exotic "Schottky" > >> into two familiar words "shot" and "key". Sometimes the writer > >> assumes that these words are

Re: Is it possible to call a class but without a new instance created?

2018-06-18 Thread Jach Fong
It seems most of confusion comes from mixing up python object and tk widgets, and ignored that the tkinter is really a python-tk-interface. Thank you for pointing it out. Terry Reedy at 2018/6/18 PM 05:19 wrote: To answer the question of the title, which is a bit different from the question in

Re: syntax difference

2018-06-18 Thread Steven D'Aprano
On Mon, 18 Jun 2018 21:03:14 +0100, Bart wrote: > In the case of Python, it is > already so big and has so many features crammed in that adding type > hints probably makes little difference. You've never used C++ have you? Describing Python as a "big" language is ludicrous. -- Steven

Re: syntax difference

2018-06-18 Thread Steven D'Aprano
On Mon, 18 Jun 2018 08:10:12 -0700, Rick Johnson wrote: > "Type-hint comments" don't exist yet. Yes they do, and they have existed for years. https://www.python.org/dev/peps/pep-0526/ But don't let a little thing like the fact you have no clue whatsoever about this stop you from

Re: syntax difference (type hints)

2018-06-18 Thread Steven D'Aprano
On Mon, 18 Jun 2018 14:57:30 +, Schachner, Joseph wrote: > Assuming that we want Python to remain a dynamically typed (but strongly > typed) language, There is no question about that. > I believe the proposed type hints are only necessary > for function definitions, What is the basis of

[issue33894] tempfile.tempdir cannot be unset

2018-06-18 Thread Eric V. Smith
Eric V. Smith added the comment: I like philiprowlands' version: - If tempdir is unset or None at any call to + If tempdir is None (the default) at any call to Care to produce a PR? -- versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python

Re: Why an object changes its "address" between adjacent calls?

2018-06-18 Thread sa...@caprilion.com.tw
Grant Edwards at 2018/6/18 PM 10:36 wrote: On 2018-06-17, Jach Fong wrote: C:\Python34\Doc>py Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. import tkinter as tk root =

[issue33894] tempfile.tempdir cannot be unset

2018-06-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: What about: "If tempdir is unset or None (the default value has not been modified) ..." ? -- nosy: +pablogsal ___ Python tracker

Re: Folk etymology, was Re: Python list vs google group

2018-06-18 Thread Jim Lee
On 06/18/2018 04:09 PM, Gregory Ewing wrote: Peter Otten wrote: "folk etymology" would be the retrofitting of the exotic "Schottky" into two familiar words "shot" and "key". Sometimes the writer assumes that these words are somehow related to the labeled object. Well, there is a thing

Re: Folk etymology, was Re: Python list vs google group

2018-06-18 Thread Gregory Ewing
Peter Otten wrote: "folk etymology" would be the retrofitting of the exotic "Schottky" into two familiar words "shot" and "key". Sometimes the writer assumes that these words are somehow related to the labeled object. Well, there is a thing called "shot noise", and you can probaby get it from

Re: Python list vs google group

2018-06-18 Thread Gene Heskett
On Monday 18 June 2018 11:45:45 Joe Pfeiffer wrote: > Peter Otten <__pete...@web.de> writes: > > Gene Heskett wrote: > >> This biggest single thing wrong with any of those old scsi > >> interfaces is the bus's 5 volt isolation diode, the designer speced > >> a shotkey(sp) diode, and some damned

[issue33898] pathlib issues with Windows device paths

2018-06-18 Thread Eryk Sun
New submission from Eryk Sun : For \\?\ extended device paths, pathlib removes the trailing slash for the root directory if the device isn't UNC or a logical (A-Z) drive. Correct: >>> str(Path('//?/UNC/')) '?\\UNC\\' >>> str(Path('//?/Z:/')) '?\\Z:\\' Incorrect:

Re: Folk etymology, was Re: Python list vs google group

2018-06-18 Thread Joe Pfeiffer
Peter Otten <__pete...@web.de> writes: > Grant Edwards wrote: > >> On 2018-06-18, Joe Pfeiffer wrote: >>> Peter Otten <__pete...@web.de> writes: >>> Gene Heskett wrote: > This biggest single thing wrong with any of those old scsi interfaces > is the bus's 5 volt isolation

[issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0`

2018-06-18 Thread STINNER Victor
STINNER Victor added the comment: Related issue: bpo-31237. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 02:36 PM, Schachner, Joseph wrote: Now that you know that 1) You are not required to modify your source code at all, even if you want to get full utility from typing, and 2) you really don't have use typing at all, nothing forces you to, and 3) it's been developed by the

[issue33896] filecmp.cmp returns True on files that differ

2018-06-18 Thread Dean Morin
Dean Morin added the comment: Fair enough, how about just making it clearer in the documentation? Currently you need to look at the source code to see what would be required for a signature clash to occur. Maybe something like: Note that the

[issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0`

2018-06-18 Thread STINNER Victor
STINNER Victor added the comment: > 1) Skip whole test_gdb when optimizations are used (who debugs with them > anyway?) It's already done, no? But the title issue is "-mcet -fcf-protection -O0" and -O0 disables optimizations. -- ___ Python

[issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found

2018-06-18 Thread miss-islington
miss-islington added the comment: New changeset 8c19a44b63033e9c70e9b552476baecb6e3e9451 by Miss Islington (bot) in branch '3.6': bpo-33663: Convert content length to string before putting to header (GH-7754) https://github.com/python/cpython/commit/8c19a44b63033e9c70e9b552476baecb6e3e9451

RE: syntax difference

2018-06-18 Thread Schachner, Joseph
On YouTube you can watch videos of Guido van Rossum presenting at PyCon from a few years ago, in which he makes clear that he has been thinking about this since 2000, that he wants someone else to guide this PEP along its path because he is too close to it, and that NOTHING about having a

[issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found

2018-06-18 Thread miss-islington
miss-islington added the comment: New changeset 53d1e9fad316e1404535157fe21cab8919f707c9 by Miss Islington (bot) in branch '3.7': bpo-33663: Convert content length to string before putting to header (GH-7754) https://github.com/python/cpython/commit/53d1e9fad316e1404535157fe21cab8919f707c9

[issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found

2018-06-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +7388 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found

2018-06-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +7387 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found

2018-06-18 Thread Steve Dower
Steve Dower added the comment: New changeset b36b0a3765bcacb4dcdbf12060e9e99711855da8 by Steve Dower (ValeriyaSinevich) in branch 'master': bpo-33663: Convert content length to string before putting to header (GH-7754)

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with David. I would like the ugly markup changed independent of how Sphinx treats it. I was thinking of changing the title to "Change obsolete tex markup in stdlib docstrings". The intent of `word' was for people to see balanced quotes, which in

Re: syntax difference

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 6:52 AM, Rick Johnson wrote: > On Monday, June 18, 2018 at 2:48:58 PM UTC-5, Ian wrote: >> I would also note that none of this applies to type hinting >> in any case. Type hints don't require the programmer to be >> able to explain anything in natural language, nor are

Re: syntax difference

2018-06-18 Thread Rick Johnson
On Monday, June 18, 2018 at 2:48:58 PM UTC-5, Ian wrote: > I would also note that none of this applies to type hinting > in any case. Type hints don't require the programmer to be > able to explain anything in natural language, nor are they > prone to becoming out-of-sync. > > Because if they do,

[issue33896] filecmp.cmp returns True on files that differ

2018-06-18 Thread R. David Murray
R. David Murray added the comment: For your problem, just don't use the default shallow setting :) -- ___ Python tracker ___ ___

[issue33896] filecmp.cmp returns True on files that differ

2018-06-18 Thread R. David Murray
R. David Murray added the comment: I understand your concern, but this is working as designed and documented. Using st_ino would mean you would return true if and only if it was the *same* file. That is not the intent. See issue 27396 for some background discussion. -- nosy:

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 12:52 PM, Rhodri James wrote: On 18/06/18 19:34, Jim Lee wrote: Type hints are just that - hints.  They have no syntactic meaning to the parser, This is plainly not true, otherwise the parser would be throwing syntax errors at you all the time.  Whether they have semantic

Re: syntax difference

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 6:25 AM, Rick Johnson wrote: > Chris Angelico wrote: > [...] >> assert """ >> , ", ";print('Will I print?');\ >> "';print("Or will I?");\ >> ';print("What about me?");'''\ >> print("And me? Where endeth");"""\ >> print('the assertion?');\ > > Chris, that's not

[issue33897] Add a restart option to logging.basicConfig()

2018-06-18 Thread Raymond Hettinger
New submission from Raymond Hettinger : Once a logger or basicConfig() has been called, later calls to basicConfig() are silent ignored. The makes it very difficult to experiment with or teach the various options at the interactive prompt or in a Jupyter notebook. What we have: >>>

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread R. David Murray
R. David Murray added the comment: I would still like to see the legacy tex markup removed from the docstrings, so I think closing this issue is not appropriate, but it's not a big enough deal that I'll push for it if Raymond wants to keep it closed. --

[issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0`

2018-06-18 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: I'd say there are use cases where gdb will be used with optimizations especially in downstream distribution. -- ___ Python tracker

Re: syntax difference

2018-06-18 Thread Rick Johnson
Chris Angelico wrote: [...] > assert """ > , ", ";print('Will I print?');\ > "';print("Or will I?");\ > ';print("What about me?");'''\ > print("And me? Where endeth");"""\ > print('the assertion?');\ Chris, that's not code... That's a syntactical representation of some random flea

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking this as closed. Though well-intentioned, the suggestion is predicated on a misperception of the role of Sphinx for CPython and existing PEP recommendations on docstring practices. -- nosy: +rhettinger resolution: -> not a bug stage:

Re: syntax difference

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 6:03 AM, Bart wrote: > In the end I got rid of them to keep the language purer, smaller and > simpler. Other approaches which don't involve annotating source code (eg. > type inference) are better IMO. Inference is great when it works. How do you assist a type inference

Re: syntax difference

2018-06-18 Thread Bart
On 18/06/2018 15:03, Steven D'Aprano wrote: It is 2018. People who say that static typing cannot be integrated with dynamic languages are nearly half a century behind the state of the art in computer programming. It can be, but it spoils the language. In the case of Python, it is already so

Re: syntax difference

2018-06-18 Thread Rhodri James
On 18/06/18 19:34, Jim Lee wrote: Type hints are just that - hints.  They have no syntactic meaning to the parser, This is plainly not true, otherwise the parser would be throwing syntax errors at you all the time. Whether they have semantic meaning to the parser is more debatable. --

Re: syntax difference

2018-06-18 Thread Rhodri James
On 18/06/18 19:21, Jim Lee wrote: Thanks for the explanation, but it only reinforces my view.  The more entrenched this feature becomes, the more we will see annotation-based tools and, at some point, we will all be forced to used annotations in order to take advantage of the tools. So don't

Re: syntax difference

2018-06-18 Thread Ian Kelly
On Mon, Jun 18, 2018 at 10:19 AM Rick Johnson wrote: > And even from the POV of a programmer, comments can be more > useful if they are ignored than if they are not. Some > programmers lack the skill required to properly explain the > workings of an algorithm in natural language, and thus, the >

Re: syntax difference

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 5:26 AM, Rick Johnson wrote: > On Monday, June 18, 2018 at 12:46:36 PM UTC-5, Chris Angelico wrote: > >> What about assertions? Are they comments too? Should we >> have, for instance: >> >> if x > 0: >> ... >> elif x < 0: >> ... >> else: >> #assert: x == 0 >>

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: RestructuredText, DocUtils, and Sphinx were developed independently, by people other than the pydev/cpython group. (The proposal to include DocUtils in the stdlib was rejected.) We converted to .rst for the Python documentation sources files about a

Re: syntax difference

2018-06-18 Thread Rick Johnson
On Monday, June 18, 2018 at 1:50:09 PM UTC-5, Chris Angelico wrote: [...] > I don't know what you mean by "syntactic meaning". Do you mean that > they create no executable bytecode, that they have no run-time > influence? Because that's not entirely true; they are stored, and can > be viewed at

Re: syntax difference

2018-06-18 Thread Rick Johnson
On Monday, June 18, 2018 at 1:02:18 PM UTC-5, Ian wrote: [...] > When PEP 3107 was written, it was anticipated that > annotations would find more uses than just type hinting. > Some of those proposed ideas (e.g. database query mapping) > depend on the annotation being readable at run-time, for >

Re: syntax difference

2018-06-18 Thread Rick Johnson
On Monday, June 18, 2018 at 12:46:36 PM UTC-5, Chris Angelico wrote: > What about assertions? Are they comments too? Should we > have, for instance: > > if x > 0: > ... > elif x < 0: > ... > else: > #assert: x == 0 > ... > > or is it better to use an 'assert' statement? After

Re: syntax difference

2018-06-18 Thread Ian Kelly
On Mon, Jun 18, 2018 at 11:27 AM Rick Johnson wrote: > > Ian wrote: > > > Uh, yes, they do. They're defined in PEP 484, and Mypy uses them for > > type-checking Python 2 code, where the annotations don't exist. > > So when will the interleaved type-hints be removed from the language >

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 11:49 AM, Chris Angelico wrote: On Tue, Jun 19, 2018 at 4:34 AM, Jim Lee wrote: On 06/18/2018 11:18 AM, Chris Angelico wrote: What, fundamentally, is the difference between type hints and assertions, such that - in your view - one gets syntax and the other is just comments?

Re: syntax difference

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 4:34 AM, Jim Lee wrote: > > > On 06/18/2018 11:18 AM, Chris Angelico wrote: >> >> What, fundamentally, is the difference between type hints and assertions, >> such that - in >> your view - one gets syntax and the other is just comments? > > Type hints are just that -

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 11:18 AM, Chris Angelico wrote: What, fundamentally, is the difference between type hints and assertions, such that - in your view - one gets syntax and the other is just comments? Type hints are just that - hints.  They have no syntactic meaning to the parser, and do not

[issue33895] LoadLibraryExW called with GIL held can cause deadlock

2018-06-18 Thread Tony Roberts
Tony Roberts added the comment: Sure, I'll get that done in the next couple of days. -- ___ Python tracker ___ ___

[issue33895] LoadLibraryExW called with GIL held can cause deadlock

2018-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Do you want to submit a PR for this? You can take a look at our developer's guide if you're new to contributing to Python: https://devguide.python.org/ -- nosy: +pitrou stage: -> needs patch type: -> behavior versions: -Python 2.7, Python 3.4,

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 11:01 AM, Ian Kelly wrote: On Mon, Jun 18, 2018 at 11:39 AM Jim Lee wrote: On 06/18/2018 07:03 AM, Steven D'Aprano wrote: As a human programmer, you surely perform your own ad hoc type checking when you write and debug code. Of course. And, I use linting tools and other

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread Patrick Lehmann
Patrick Lehmann added the comment: Having single quotes in docstrings is also ok for Sphinx documentation. Btw. ReStructured text (docutils) was invented to document Python sources, why is it not used by Python? -- ___ Python tracker

Re: syntax difference

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 4:09 AM, Jim Lee wrote: > > > On 06/18/2018 10:46 AM, Chris Angelico wrote: >> >> On Tue, Jun 19, 2018 at 3:34 AM, Jim Lee wrote: >>> >>> >>> On 06/18/2018 07:03 AM, Steven D'Aprano wrote: As a human programmer, you surely perform your own ad hoc type checking

[issue33896] filecmp.cmp returns True on files that differ

2018-06-18 Thread Dean Morin
New submission from Dean Morin : By default `filecmp.cmp()` has `shallow=True` which can produce some surprising behavior. In the docs it states: > If shallow is true, files with identical os.stat() signatures are taken to be > equal. However the "signature" only considers the file mode,

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 10:46 AM, Chris Angelico wrote: On Tue, Jun 19, 2018 at 3:34 AM, Jim Lee wrote: On 06/18/2018 07:03 AM, Steven D'Aprano wrote: As a human programmer, you surely perform your own ad hoc type checking when you write and debug code. Of course. And, I use linting tools and

[issue33301] Add __contains__ to pathlib

2018-06-18 Thread Andrew Berger
Andrew Berger added the comment: I can make these changes. Would probably add a .exists method to PurePath, using the _normal_accessor.stats staticmethod, then call that in __contains__ -- nosy: +aberger5b ___ Python tracker

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, you are right. I didn't write much English TeX, and used other types of quotes. I'm sure that I seen `such quotation' in non-TeX files, but maybe my memory fools me. In any case using this writing here is likely an artifact of copying from a TeX

Re: syntax difference

2018-06-18 Thread Ian Kelly
On Mon, Jun 18, 2018 at 11:39 AM Jim Lee wrote: > On 06/18/2018 07:03 AM, Steven D'Aprano wrote: > > As a human programmer, you surely perform your own ad hoc type checking > > when you write and debug code. > Of course. And, I use linting tools and other forms of static type > checking. What I

Re: syntax difference

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 3:34 AM, Jim Lee wrote: > > > On 06/18/2018 07:03 AM, Steven D'Aprano wrote: >> >> As a human programmer, you surely perform your own ad hoc type checking >> when you write and debug code. > > Of course. And, I use linting tools and other forms of static type > checking.

Re: syntax difference

2018-06-18 Thread Jim Lee
On 06/18/2018 07:03 AM, Steven D'Aprano wrote: As a human programmer, you surely perform your own ad hoc type checking when you write and debug code. Of course.  And, I use linting tools and other forms of static type checking.  What I don't like is adding the *syntax* for static type

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: > AFAIK `name' is common writing of quotes in English texts I don't remember ever seeing it before. It looks like a typo to me, and I am sure it will to most readers. I think it should be corrected as if it were a typo. --

Re: syntax difference

2018-06-18 Thread Rick Johnson
Ian wrote: > Uh, yes, they do. They're defined in PEP 484, and Mypy uses them for > type-checking Python 2 code, where the annotations don't exist. So when will the interleaved type-hints be removed from the language specification? -- https://mail.python.org/mailman/listinfo/python-list

Re: syntax difference

2018-06-18 Thread Rick Johnson
Steven D'Aprano wrote: > Moving the type-checking out of the core language into the > IDE or linter which can be used or not used according to > the desire of the programmer Except, what your poppycock commentary seems to glaze over is the fact that whilst a programmer can certainly decided to

Re: syntax difference

2018-06-18 Thread Rick Johnson
Steven D'Aprano said: > Python is not only alive and well, but actually growing in > popularity according to (as far as I can see) all the well- > known measures of language popularity. Steven *ALSO* said: > "Ever since I learned about confirmation bias, I've been > seeing it everywhere." Hmm?

Re: syntax difference

2018-06-18 Thread Ed Kellett
are you someone's ironic 3rd-year art project signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

[issue33893] Linux terminal shortcuts support in python shell

2018-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks. I have presumed that Linux consoles are also line oriented, but hesitated to say so without really knowing so. -- ___ Python tracker

Re: syntax difference

2018-06-18 Thread Rick Johnson
Steven D'Aprano wrote: [...] > particular at DropBox, which is (I believe) funding a lot of Guido's time > on this, because they need it. And now we get to the truth! Guido's new puppet master is the sole reason why this fine community -- of once free-roaming *STALLIONS*-- is now corralled

Re: syntax difference

2018-06-18 Thread Rick Johnson
Bart wrote: [...] > For example, comments that start with #T# (and in my case, > that begin at the start of a line). Such would be a _breeze_ to parse out. And i would argue (given a sufficiently unique tag) that arbitrary white space would not be any more error prone, either. Thus, your "tagged

Folk etymology, was Re: Python list vs google group

2018-06-18 Thread Peter Otten
Grant Edwards wrote: > On 2018-06-18, Joe Pfeiffer wrote: >> Peter Otten <__pete...@web.de> writes: >> >>> Gene Heskett wrote: >>> This biggest single thing wrong with any of those old scsi interfaces is the bus's 5 volt isolation diode, the designer speced a shotkey(sp) diode,

Re: syntax difference

2018-06-18 Thread Rick Johnson
On Monday, June 18, 2018 at 6:43:36 AM UTC-5, Steven D'Aprano wrote: > The programmer can ignore [type-hints], just as they can > ignore any other form of documentation. Type-hints, as implemented, break all the rules of conventional documentation. In any programming language i have ever seen,

Re: syntax difference

2018-06-18 Thread Rick Johnson
On Monday, June 18, 2018 at 6:57:27 AM UTC-5, Steven D'Aprano wrote: > I still think that Python has been going nowhere but downhill ever since > extended slicing was added in version 1.4. Apples to oranges! -- https://mail.python.org/mailman/listinfo/python-list

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread R. David Murray
R. David Murray added the comment: No, it is (somewhat) unique to tex. If you write `word' tex would turn that into a pair of opposing quotes in the typeset document, as opposed to 'word' (the convention in regular text/emails/posts/etc) where you'd just see ascii quotes. tex would render

Re: syntax difference

2018-06-18 Thread Ben Bacarisse
Bart writes: > On 18/06/2018 11:45, Chris Angelico wrote: >> On Mon, Jun 18, 2018 at 8:33 PM, Bart wrote: > > >>> You're right in that neither task is that trivial. >>> >>> I can remove comments by writing a tokeniser which scans Python source and >>> re-outputs tokens one at a time. Such a

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the problem? Docstrings are not written in the reStructuredText format in general. If Sphinx complains about docstrings in the stlib, don't run Sphinx for the stdlib files or report a Sphinx bug. Even if remove all `x', docstrings still will not

Re: syntax difference

2018-06-18 Thread Rick Johnson
Chris Angelico wrote: > Bart wrote: [...] > > What will those look like? If copyright/license comments > > have their own specific syntax, then they just become > > another token which has to be recognized. > > If they have specific syntax, they're not comments, are they? Yes, they are. >From

[issue33866] Stop using OrderedDict in enum

2018-06-18 Thread INADA Naoki
New submission from INADA Naoki : New changeset e57f91a0f0d5700ec466c9dd0fd2d2b5323a5e76 by INADA Naoki in branch 'master': bpo-33866: enum: Stop using OrderedDict (GH-7698) https://github.com/python/cpython/commit/e57f91a0f0d5700ec466c9dd0fd2d2b5323a5e76 --

Re: Python list vs google group

2018-06-18 Thread Grant Edwards
On 2018-06-18, Joe Pfeiffer wrote: > Peter Otten <__pete...@web.de> writes: > >> Gene Heskett wrote: >> >>> This biggest single thing wrong with any of those old scsi interfaces is >>> the bus's 5 volt isolation diode, the designer speced a shotkey(sp) >>> diode, and some damned bean counter saw

[issue33894] tempfile.tempdir cannot be unset

2018-06-18 Thread Philip Rowlands
Philip Rowlands added the comment: How about - If tempdir is unset or None at any call to + If tempdir is None (the default) at any call to This avoids headaches over the meaning of "unset", and accurately reflects the code at: https://github.com/python/cpython/blob/3.6/Lib/tempfile.py#L289

[issue23660] Turtle left/right inverted when using different coordinates orientation

2018-06-18 Thread Carol Willing
Carol Willing added the comment: Reopened at the request of the original submitter. -- resolution: remind -> stage: resolved -> patch review status: closed -> open ___ Python tracker

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread R. David Murray
R. David Murray added the comment: By the way, in case anyone is curious, I'm pretty sure that markup is left over from the days when tex/latex was what docs were *written* in. -- ___ Python tracker

Re: syntax difference (type hints)

2018-06-18 Thread Chris Angelico
On Tue, Jun 19, 2018 at 12:57 AM, Schachner, Joseph wrote: > Assuming that we want Python to remain a dynamically typed (but strongly > typed) language, I believe the proposed type hints are only necessary for > function definitions, where the caller really needs to know the types of >

Re: Python list vs google group

2018-06-18 Thread Joe Pfeiffer
Peter Otten <__pete...@web.de> writes: > Gene Heskett wrote: > >> This biggest single thing wrong with any of those old scsi interfaces is >> the bus's 5 volt isolation diode, the designer speced a shotkey(sp) >> diode, and some damned bean counter saw the price diff and changed it to > > Is this

Re: syntax difference

2018-06-18 Thread Rick Johnson
On Monday, June 18, 2018 at 5:45:28 AM UTC-5, Chris Angelico wrote: > So in both cases, you would probably end up with something > like 2to3. And there you have it! Just Like Python3000, the python devs have caused a major disruption by saddling us with the syntactic noise of type- hints.

Re: syntax difference (type hints)

2018-06-18 Thread Ian Kelly
FYI, Python type hints aren't "proposed"; they're already here. The function annotation syntax was added in 3.0, without any imposition of semantic meaning or requirements on it, and allowed to simmer for several years for third-party frameworks to find uses for. Python 3.5 added the typing module

Re: syntax difference

2018-06-18 Thread Ian Kelly
On Mon, Jun 18, 2018 at 9:17 AM Rick Johnson wrote: > > Chris Angelico wrote: > [...] > > What was the quote before that? > > > > > "Type-hint comments" would allow: > > > (3) and those who utterly *HATE* them, to write a simpl[e] > > > little function which will strip them from any and all >

[issue28710] Sphinx incompatible markup in the standard library docstrings

2018-06-18 Thread R. David Murray
R. David Murray added the comment: Right, my opinion is that we shouldn't be putting markup in docstrings. They are (from our point of view) pure text. I don't know if discussion on python-dev is warranted, it seems like a fairly uncontroversial change, since it brings the docstrings in

  1   2   >