Re: Proper way to download stylesheets and templates

2018-06-25 Thread T Berger
On Monday, June 25, 2018 at 12:12:26 PM UTC-4, T Berger wrote:
> I’m creating a webapp and trying to download a stylesheet and templates from 
> my manual’s support site. I must be doing something wrong, because when I try 
> to run my app, I get a 404 error message. I downloaded the files by dragging 
> them off the screen into my webapp folder. But I’m getting a weird extension: 
> “hf.css.webloc.” Is this the problem? Is there a proper way to download such 
> files?
> Thanks, 
> Tamara

I solved my problem. Please ignore the question.
Tamar
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33963] IDLE macosx: add tests.

2018-06-25 Thread Ned Deily


Ned Deily  added the comment:

> Would this affect any of the installation adjustments?

I don't think so but there's one way to be sure :)  If you merge your changes 
to master, we can doublecheck before backporting them.

> Is the windowing type determined by the hardware, or by the macOS version?

The windowing type is determined by the variant of Tk that tkinter is 
dynamically linking with.  While Cocoa Tk is now the most common, it is still 
possible to run into the other variants; for example, MacPorts supports 
building an X11 (Xquartz) variant of Tk 8.6 along with a Cocoa one.  If support 
for the various window types isn't causing a maintenance burden, it would be 
nice to retain them.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-25 Thread hervé

Change by hervé :


--
pull_requests: +7536

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33958] Unused variable in pur embedding example

2018-06-25 Thread Srinivas Reddy T


Change by Srinivas  Reddy T :


--
keywords: +patch
pull_requests: +7535
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33964] IDLE maxosc.overrideRootMenu: remove unused menudict

2018-06-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +7534
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33964] IDLE maxosc.overrideRootMenu: remove unused menudict

2018-06-25 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Function local name 'menudict' is initialized empty, two key value pairs are 
added, and it is never touched again.

--
messages: 320470
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE maxosc.overrideRootMenu: remove unused menudict
type: performance
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33963] IDLE macosx: add tests.

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Ned, I would like to rename at least some of the functions in idlelib.macosx.  
For instance, function overrideRootMenu to override_root_menu.  Would this 
affect any of the installation adjustments?  IE, does the installer import the 
module for whatever reason?

Also, do the windowing types on currently supported machines still include all 
of Xquartz, Cocoa, Carbon (both Aqua), and other?  Is the windowing type 
determined by the hardware, or by the macOS version?

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33964] IDLE maxosc.overrideRootMenu: remove unused menudict

2018-06-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
dependencies: +IDLE macosx: add tests.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33963] IDLE macosx: add tests.

2018-06-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: IDLE macosc: add tests. -> IDLE macosx: add tests.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33963] IDLE macosc: add tests.

2018-06-25 Thread Terry J. Reedy


New submission from Terry J. Reedy :

For overrideRootMenu, move nested functions to module level.
Try to move 3 imports to module level.  Test startup on mac.
Mock 'window' with mock functions.

--
messages: 320468
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE macosc: add tests.
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33956] update vendored expat to 2.2.5

2018-06-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
keywords: +patch
pull_requests: +7533
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2018-06-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 16137fe22f3f9bbbd50fac2a729172976c553718 by Benjamin Peterson 
(Zachary Ware) in branch '2.7':
bpo-27780: Make pgen.c C89 compliant (GH-7915)
https://github.com/python/cpython/commit/16137fe22f3f9bbbd50fac2a729172976c553718


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27755] Retire DynOptionMenu with a ttk Combobox

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Yes, we should use ttk.Spinbox: #33962.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox

2018-06-25 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Spinoff from #27755, which has a image of tk and ttk versions of a spinbox on 
Mac and asks about using ttk.spinbox.

ttk Spinbox was added to tcl/tk in 8.5.9 and to tkinter.ttk in 3.7. I believe 
there are three cases to consider.
tcl/tk   python  action
>= 8.5.9  >=3.7  from tkinter.tkk import Spinbox
>= 8.5.9   3.6   import Entry and copy class Spinbox(Entry) code
< 8.5.9  from tkinter import Spinbox

Serhiy, is tcl/tk < 8.5.9 something we realistically need to worry about, on 
Linux?

In Dec 2018 or Jan 2019, when 3.6 switches to security fixes only, the 3.6 code 
can be deleted.

For the present, only use config options in the common subset:
cursor, takefocus, validate, validatecommond, invalidcommand,
xscrollcommand, command, to, from_, increment, values, wrap, format.
Is this sufficient?

Whenever we make 8.5.9 or later a requirement, the tkinter Spinbox can be 
dropped and the class and style options used.  Or we can subclass 
tkinter.Spinbox and accept and somehow deal with class and style options.  (We 
are not presently using custom styles.)

For the present, the code can go in query.py, presently only 300 lines.  When 
we only need to cater to 3.7+ and 8.5.9+, the code will be replaced by normal 
import from ttk.

Comman methods: identify, bbox, delete, icursor, index, insert, get.
ttk has set, while tk sets through a textvariable.  If we subclass tk.spinbox, 
it could have a set method that uses a private Var.

 Do the universal widget methods listed on 
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/universal.html
all apply to ttk widgets?
identify,

--
assignee: terry.reedy
components: IDLE
messages: 320465
nosy: cheryl.sabella, markroseman, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: use ttk.spinbox
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33460] "..." is used to confusingly indicate many different things in chapter 3

2018-06-25 Thread ppperry


Change by ppperry :


--
title: ... used to indicate many different things in chapter 3, some are 
confusing -> "..." is used to confusingly indicate many different things in 
chapter 3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4260] Document that ctypes.xFUNCTYPE are decorators.

2018-06-25 Thread Andrés Delfino

Andrés Delfino  added the comment:

I suspect we'll be working on this PR a little, but a least it's a start to get 
this moving.

--
nosy: +adelfino

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4260] Document that ctypes.xFUNCTYPE are decorators.

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +7532
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Mark's PR added two conversions, in macosx, that I missed.  I rechecked a 
recursive case sensitive whole-word grep of 'windows' in idlelib and I believe 
all remaining occurrences refer to the Windows OS (usually capitalized) or 
multiple windows.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset c6040638aa1537709add895d24cdbbb9ee310fde by Miss Islington (bot) 
in branch '3.6':
bpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)
https://github.com/python/cpython/commit/c6040638aa1537709add895d24cdbbb9ee310fde


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset ee60e36fbf640e9e2ab6cd26821aad5d90529d96 by Miss Islington (bot) 
in branch '3.7':
bpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)
https://github.com/python/cpython/commit/ee60e36fbf640e9e2ab6cd26821aad5d90529d96


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7531

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7530

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 42397731d7ba8bdf63025d48008d133cb2070229 by Terry Jan Reedy (Mark 
Roseman) in branch 'master':
bpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)
https://github.com/python/cpython/commit/42397731d7ba8bdf63025d48008d133cb2070229


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27755] Retire DynOptionMenu with a ttk Combobox

2018-06-25 Thread Mark Roseman


Mark Roseman  added the comment:

Given the difference between the old and new (ttk) spinbox, especially on 
macOS, I'd like to incorporate it into IDLE when available. See screenshot 
spinbox.png, noting white border around old one.

Terry, can we add a spinbox wrapper to IDLE for the time being? If so, would 
you prefer it done as its own (very little) module? Or is there any value to 
adding a module to hold various small UI wrappers and convenience procs?

--
Added file: https://bugs.python.org/file47652/spinbox.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Static variables [was Re: syntax difference]

2018-06-25 Thread Steven D'Aprano
On Mon, 25 Jun 2018 18:22:56 +, Grant Edwards wrote:

> On 2018-06-24, Steven D'Aprano  wrote:
> 
>> Building functions is cheap. Cheap is not free.
>>
>> Inner functions that aren't exposed to the outside cannot be tested in
>> isolation, you can't access them through help() interactively. Given
>> the choice between:
> 
> [...]
> 
>> so not expensive, but not free either. If using an inner function has
>> no advantages to you, why pay that tiny cost for no benefit?
> 
> The benefit of an inner function is that it makes it perfectly clear to
> the reader that that function is not used outside the function where it
> is defined.  It also makes it more difficult for other fuctions to muck
> things up by changing the binding of a global name.

You say "muck things up", I say "use mocks for testing".

You're right, I shouldn't have said *no* advantages, I should have said 
"few". (Although I did use the proviso, no advantages to *you* -- this is 
a personal trade-off each programmer must make.)

Inner functions are especially useful in languages like Pascal with 
compile-time correctness tests (a.k.a. static type checking). Python 
doesn't have those, so we rely far more on unit tests. My personal trade-
off is that with no way to test inner functions, I have to assume that 
they're buggy.

(Aside from those which are simple enough to be obviously correct, as 
opposed to those that have no obvious bugs.)

Inner functions are particularly insidious because they *look* like you 
can doctest them, but you can't. I once got badly bitten by a program I 
wrote which used doctests extensively. Every doctest passed, or at least 
so I thought, and yet the program was *badly* incorrect when I ran it.

Eventually I worked out that because the doctests were in inner 
functions, they weren't being run. My TDD was in vain -- I thought my 
tests were passing, but they weren't being run at all, and the inner 
functions were riddled with bugs.

So I've always been rather wary of using inner functions since then.


> IOW, you use a local function instead of a global one for the exact same
> reasons you use local "variables" instead of global ones.

Well, I dunno... functions aren't quite like variables. Variables are 
pretty boring things, they just take a value, whereas functions can be 
quite complex entities that *do stuff*. Functions ought to be tested.

You're also likely to have far fewer functions than variables, and far 
fewer likely name clashes. You might have a dozen variables called 
"total" but only one function called "calculate_total". It would be 
terribly hard to write a program with only global variables, but it is 
rather easy to write one with only global functions, and some languages 
don't offer the ability to next functions at all.


> In Python, functions are first class objects.  Binding a name to a
> function is no different than binding it to an integer, list, string, or
> dict.  Don't the global vs. local cost vs. benefit calculations apply
> equally well to function objects as they do to those other sorts of
> objects?

I've never measured it, but I would expect that, cheap as it is, 
constructing a new function each time you need to call it would be more 
expensive than looking up a pre-existing global function.


-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33930] Segfault with deep recursion into object().__dir__

2018-06-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Alistair, how did you happen upon this case?

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like Popen of multiprocess.popen_spawn_win32 has a race condition. If 
the child process is killed in the parent using terminate() before the child 
process "steals" rhandle, rhandle remains open. I wrote the PR 7921 to fix it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7528

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7529

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 937ee9e745d7ff3c2010b927903c0e2a83623324 by Victor Stinner in 
branch 'master':
Revert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)
https://github.com/python/cpython/commit/937ee9e745d7ff3c2010b927903c0e2a83623324


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +7527
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread Mark Roseman


Change by Mark Roseman :


--
pull_requests: +7526

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-25 Thread Steve Dower


Steve Dower  added the comment:

> outside of the basic Latin characters (0-255)

This should be (0-127). The Latin characters in 128-255 are considered extended 
ones, and may be decomposed by normalization.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-25 Thread Steve Dower


Steve Dower  added the comment:

The benchmark may not be triggering that much work. NFKC normalization only 
applies for characters outside of the basic Latin characters (0-255).

I ran the below benchmarks and saw a huge difference. Granted, it's a very 
degenerate case with collections this big, but it appears to be linear with 
len(NAMES), suggesting that the normalization is the expensive part.

>>> CHRS=[c for c in (chr(i) for i in range(65535)) if c.isidentifier()]
>>> def makename():
...  return ''.join(random.choice(CHRS) for _ in range(10))
...
>>> NAMES = [makename() for _ in range(1)]
>>> timeit.timeit('len(set(NAMES))', globals=globals(), number=10)
38.0400752604
>>> timeit.timeit('len(set(unicodedata.normalize("NFKC", n) for n in NAMES))', 
>>> globals=globals(), number=10)
820.2586788580002

I wonder if it's better to catch the SyntaxError and do the check there? That 
way we don't really have a performance impact, since it's only going to show up 
in exceptional cases anyway.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-25 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
pull_requests:  -7403

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-25 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
pull_requests:  -7525

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-25 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
pull_requests:  -7482

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7525

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-06-25 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18932] Optimize selectors.EpollSelector.modify()

2018-06-25 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

This was implemented in https://bugs.python.org/issue30014. Closing as 
duplicate.

--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
versions: +Python 2.7 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-06-25 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +7524
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Chris Cogdon


Chris Cogdon  added the comment:

CLA signed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Chris Cogdon


Chris Cogdon  added the comment:

Also, one occurrence of s/:/;/

This is my First PR! I've read the contribution docs, but am very open to 
correction.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +7521
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33960] IDLE REPL: Strange indentation

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Python's secondary prompt in interactive mode is an artifact of the fact the 
command line consoles work with physical lines while python works with 
statements that quite possibly comprises multiple lines.

As mentioned in the its doc, IDLE works with statements.  You edit and enter 
complete statements, not a line at a time. The history mechanism retrieves 
complete statements, not a line at a time.  The side effect is what you 
encountered.  '>>> ' is not an indent.  '' is.

While working with statements instead of lines is one of Shell's best features, 
the indentation awkwardness is one of its worst.  I intend to open an issue 
about separating the prompt from statement entry to remove the latter.  I will 
add you as nosy so you can give an opinion, I hope in support ;-).

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2018-06-25 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2018-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

I tried 64-bit builds of Python 2.7 and 3.7rc1 (binaries from python.org) on 
Windows 10 on year 2045: start with no error, time.time() and 
datetime.datetime.now() don't fail.

I tried Python 2.7.12 and 3.5.2 on Ubuntu 16.04 in WSL on my Windows 10: same, 
start with no error, time.time() and datetime.datetime.now() don't fail. It's 
64-bit Ubuntu with 64-bit binaries for Python 2 and Python 3 (check 
sys.maxsize).

I even compiled Python 2.7.15 and 3.7rc1 on Ubuntu 16.04 in WSL on my Windows 
10: same again, start with no error, time.time() and datetime.datetime.now() 
don't fail. Python 2 and 3 have been compiled in 64-bit mode, since it's a 
64-bit Ubuntu.

Everything is fine. I failed to reproduce your bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-25 Thread Valeriya Sinevich


Valeriya Sinevich  added the comment:

I sent a PR and measured how it affected the performance by creating a 
dataclass with 1 members.
python.bat -m timeit -s "from dataclasses import make_dataclass" -s "arg_list = 
[chr(k) * i for k in range(97, 123) for i in range(1, 500)]" 
"make_dataclass('a', arg_list)" 
The performance didn't change, both before and after the changes it takes 
around 14.5s.

--
nosy: +steve.dower, valer

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-25 Thread Valeriya Sinevich


Change by Valeriya Sinevich :


--
keywords: +patch
pull_requests: +7519
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Chris Cogdon


New submission from Chris Cogdon :

The documentation for dataclasses.dataclass includes this text:

"If any of the added methods already exist on the class, a TypeError will be 
raised."

However, the documentation for various options has ONE case of TypeError, some 
cases of ValueError and other cases of "does nothing".

I'll attempt a fix and create a PR for this.

--
assignee: docs@python
components: Documentation
messages: 320444
nosy: chriscog, docs@python
priority: normal
severity: normal
status: open
title: Inconsistency in exceptions for dataclasses.dataclass documentation
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2018-06-25 Thread Zachary Ware


Change by Zachary Ware :


--
pull_requests: +7518

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24567] random.choice IndexError due to double-rounding

2018-06-25 Thread Tim Peters


Tim Peters  added the comment:

Mark, do you believe that 32-bit Linux uses a different libm?  One that fails 
if, e.g., SSE2 were used instead?  I don't know, but I'd sure be surprised it 
if did.  Very surprised - compilers have been notoriously unpredictable in 
exactly when and where extended precision gets used in compiled code, so sane 
code (outside of assembler) doesn't rely on it.

I'd be similarly surprised if hypothetical 3rd party libraries _assuming_ 
extended arithmetic existed.  Any sane person writing such a library would take 
it upon themselves to force extended precision on entry (if that's what they 
wanted), and restore the original FPU control state on exit.

I'm no more worried about this than, say, worried about that some dumbass 
platform may set the rounding mode to "to plus infinity" by default - and I 
wouldn't hesitate there either for Python startup to force it to nearest/even 
rounding.  Sure, there _may_ be some library out there for such a platform that 
assumes +Inf rounding, but I fundamentally don't care ;-)

In any case, `random` remains a red herring.  There are potential gratuitous 
numeric differences all over the place.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33958] Unused variable in pur embedding example

2018-06-25 Thread Emily Morehouse


Emily Morehouse  added the comment:

Thanks, Philip! If you're interested in submitting a PR, please do! If not, 
just comment back so someone else can pick it up.

--
nosy: +emilyemorehouse
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2018-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

> I get this error when starting the interpreter in Windows subsystem for Linux 
> (WSL).

This bug is currently closed, please open a new bug.

About your issue. I'm not sure if Windows subsystem for Linux is officially 
supported. How did you install Python 2.7 and 3.7? Are you testing 32-bit or 
64-bit Python? (Again, please answer in your new issue.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: syntax difference

2018-06-25 Thread boB Stepp
On Mon, Jun 25, 2018 at 2:37 AM Mark Lawrence  wrote:
>
> On 24/06/18 00:44, boB Stepp wrote:
> > I imagine that the
> > transition from version 2 to 3 was not undertaken halfheartedly, but
> > only after much thought and discussion since it did break backwards
> > compatibility.
> >
>
> So much so that a specific mailing list was set up just to discus the
> transition, archives here https://mail.python.org/pipermail/python-3000/

Thanks for the link, Mark.  I was not aware of this archive.  It will
probably answer some things I have always wondered about.


-- 
boB
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24935] LDSHARED is not set according when CC is set.

2018-06-25 Thread Martin Scherer


Change by Martin Scherer :


--
keywords: +patch
pull_requests: +7517
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33960] IDLE REPL: Strange indentation

2018-06-25 Thread Julien Palard


New submission from Julien Palard :

Using IDLE REPL, I found confusing the absence of a "secondary prompt" while 
typing multiline statements, see attached screenshot where the "correctly 
aligned" code raises a SyntaxError while a strangely unaligned code is given 
correctly to the interpreter.

--
assignee: terry.reedy
components: IDLE
files: 2018-06-25-223359_1920x1080_scrot.png
messages: 320440
nosy: mdk, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE REPL: Strange indentation
versions: Python 3.6
Added file: 
https://bugs.python.org/file47651/2018-06-25-223359_1920x1080_scrot.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-25 Thread Tal Einat


Tal Einat  added the comment:

When ready, should this (and other AC conversions) be backported to the 
relevant 3.x branches?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-25 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

On Jun 23, 2018, at 20:21, Nick Coghlan  wrote:
> 
> Only exposing a `forced_hash_seed` (and hiding randomly generated ones as 
> `forced_hash_seed=None`) seems reasonable though, since those can already be 
> read from os.environ anyway.

Only mirroring $PYTHONHASHSEED probably makes the whole ask less useful.  Maybe 
I should abandon the PR, although it may still make sense to export the full 
_PyCoreConfig structure.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33959] doc Remove time complexity mention from list Glossary entry

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +7516
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33959] doc Remove time complexity mention from list Glossary entry

2018-06-25 Thread Andrés Delfino

New submission from Andrés Delfino :

Per Raymond's comment in msg319931 I believe time complexity for list items 
access should be removed from the Glossary.

--
assignee: docs@python
components: Documentation
messages: 320437
nosy: adelfino, docs@python
priority: normal
severity: normal
status: open
title: doc Remove time complexity mention from list Glossary entry
type: enhancement
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: syntax difference

2018-06-25 Thread Chris Angelico
On Tue, Jun 26, 2018 at 6:04 AM, Grant Edwards
 wrote:
> On 2018-06-24, Steven D'Aprano  wrote:
>
>> That's nothing, there are languages where the standard way to write
>> a for loop is to call an external program that generates a stream of
>> numeric strings separated by spaces in a subprocess, and read the
>> strings from standard input as text.
>
> What language are you bashing now?
>

I swear, some people were just bourne funny...

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-25 Thread Grant Edwards
On 2018-06-24, Steven D'Aprano  wrote:

> That's nothing, there are languages where the standard way to write
> a for loop is to call an external program that generates a stream of
> numeric strings separated by spaces in a subprocess, and read the
> strings from standard input as text.

What language are you bashing now?

;)

-- 
Grant Edwards   grant.b.edwardsYow! ANN JILLIAN'S HAIR
  at   makes LONI ANDERSON'S
  gmail.comHAIR look like RICARDO
   MONTALBAN'S HAIR!

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: range

2018-06-25 Thread Schachner, Joseph
Re: "I know I'm going to get flak for bringing this up this old issue, but 
remember when you used to write a for-loop and it involved creating an actual 
list of N integers from 0 to N-1 in order to iterate through them? Crazy.

But that has long been fixed - or so I thought. When I wrote, today:



for i in range(1): pass  # 100 million



on Python 2, it used up 1.8GB, up to the limit of my RAM, and it took several 
minutes to regain control of my machine (and it never did finish). You don't 
expect that in 2018 when executing a simple empty loop.

On Py 2 you have to use xrange for large ranges - that was the fix.

Somebody however must have had to gently and tactfully point out the issue. I'm 
 afraid I'm not very tactful."



It HAS been fixed in Python 3, since the beginning of that branch.  In Python 3 
range is what xrange was in Python 2.  I used past tense there on purpose.



Python 2 actual demise is scheduled.  See: https://python3statement.org/

It's a list of project that have pledged to drop support for Python2.7 no later 
than January 1, 2020. You will recognize many of them: Pandas, IPython, NumPy, 
Matplotlib, Jupyter... etc



Anyone talking about the future of Python and features that might be added to 
Python really has to be talking about Python 3, because Python 2 support is 
already ramping down and will completely end on January 1, 2020.  The original 
plan was to end it in 2015, but the extra five years were added to give 
everyone plenty of time to switch.



-- Joseph S.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Accessing the Python list

2018-06-25 Thread Abdur-Rahmaan Janhangeer
i would prefer everyone using the mailing
list (misses many spams) but of course that is a crazy idea

(no need to reply with brain-damaged by facebook, aol, gmail etc
expressions)

Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ


>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where's the junk coming from?

2018-06-25 Thread Mark Lawrence

On 24/06/18 21:39, Mark Lawrence wrote:

Hi folks,

In the last hour or so I've seen via thunderbird and gmane around 15 
emails from various people where the from field is 
name@1261/38.remove-r7u-this.  The part after the @ symbol never 
changes.  I've seen the contents previously, apart from one from the 
RUE.  Users' complete email addresses are given right at the top.  What 
gives?




More of the flaming things, this time name@1261/38.remove-ij1-this.  Any 
ideas as I don't understand this stuff?


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


wily+python=NNTPclient ?

2018-06-25 Thread qhsgrant
Gary Capell who designed wily [in the 90s] mentioned that it
could interface with python to make a NNTP client.

As a daily user of wily, I seek info on connecting with 
python to get NNTP service.

== TIA.

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33958] Unused variable in pur embedding example

2018-06-25 Thread Philip Kendall


New submission from Philip Kendall :

Line 6 of the "Pure Embedding" example at 
https://docs.python.org/3/extending/embedding.html#pure-embedding :

PyObject *pName, *pModule, *pDict, *pFunc;

contains the pDict variable which is not used anywhere else in the code, giving 
a compiler warning. Simple fix: just remove pDict from the list of variables.

I can make a PR if you need one.

--
assignee: docs@python
components: Documentation
messages: 320436
nosy: Philip Kendall, docs@python
priority: normal
severity: normal
status: open
title: Unused variable in pur embedding example
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33883] doc Mention mypy, pyrex, pytype and PyAnnotate in FAQ

2018-06-25 Thread Andrés Delfino

Andrés Delfino  added the comment:

I'm adding Pyre to the list of type checkers. I have also simplified the 
proposed text.

--
title: doc Mention mypy, pytype and PyAnnotate in FAQ -> doc Mention mypy, 
pyrex, pytype and PyAnnotate in FAQ

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24567] random.choice IndexError due to double-rounding

2018-06-25 Thread Mark Dickinson


Mark Dickinson  added the comment:

[Tim]
> a couple lines of inline assembler could be added at Python startup to
> set the Pentium's FPU "precision control" bits to "round to 53 bits" mode

On second thoughts, I don't think this will work; or at least, not easily. The 
libm on such a platform may expect the FPU to be in 64-bit precision mode. So 
we'd potentially need to switch the precision before calling any math library 
function and then switch it back again afterwards. And then there may be 3rd 
party libraries that need the same treatment.

On the existence of platforms with double rounding, last time I checked, 32-bit 
Linux was the most obvious offender on Intel hardware. Windows used to use the 
x87 but set the precision to 53 bits, and I think newer versions may well use 
SSE2 in preference to x87. macOS has used SSE2 for a good number of releases 
now.

And indeed, I just tested Python 3.5.2 on Ubuntu 16.04.4 LTS 32-bit (running in 
a VM on a not-too-ancient MacBook Pro), and it exhibits double rounding:

>>> (1e16 + 2.).hex()
'0x1.1c37937e08002p+53'
>>> (1/2731).hex()
'0x1.7ff4005ffd002p-12'
>>> 1/(1 - 2**-53)
1.0

Expected results without double rounding:

>>> (1e16 + 2.).hex()
'0x1.1c37937e08001p+53'
>>> (1/2731).hex()
'0x1.7ff4005ffd001p-12'
>>> 1/(1 - 2**-53)
1.0002

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33869] doc Add link to list definition in Glossary list entry

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


--
title: doc Add set, frozen set, and tuple entries to Glossary -> doc Add link 
to list definition in Glossary list entry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33952] doc Fix typo in str.upper() documentation

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33877] Doc: Delete UNIX qualification for script running instructions

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Static variables [was Re: syntax difference]

2018-06-25 Thread Marko Rauhamaa
Grant Edwards :
> IOW, you use a local function instead of a global one for the exact
> same reasons you use local "variables" instead of global ones.
>
> In Python, functions are first class objects.  Binding a name to a
> function is no different than binding it to an integer, list, string,
> or dict.  Don't the global vs. local cost vs. benefit calculations
> apply equally well to function objects as they do to those other sorts
> of objects?

Precisely!

The most important reason to use inner functions or inner classes is
that it's cromulent for the task at hand, stylistically opportune or
optimal, not to use the word Pythonic.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33957] use standard term than generic wording

2018-06-25 Thread Srinivas Reddy T


Change by Srinivas  Reddy T :


--
title: use correct term than generic wording -> use standard term than generic 
wording

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Package directory question

2018-06-25 Thread Robert Latest via Python-list
Ben Finney wrote:
> Robert Latest via Python-list  writes:
>
>> Because the main.py script needs to import the tables.py module from
>> backend, I put this at the top if main.py:
>>
>>sys.path.append('../..')
>>import jobwatch.backend.tables as tables
>>
>> My question is: Is this the way it should be done? It looks fishy. The
>> only alternative I could come up with is to put a symlink to tables.py
>> into the frontend directory, which also seems fishy.
>
> Your fish-sense is working correctly. Both of those are hard-coding the
> path, when the Python import mechanism is designed so you don't do that.

[...]

> * To install for use while also developing, add the ‘--editable’ option.

Ah, that's what I needed. Of course the problem I had was only present
during development. I haven't really looked into pip yet, so far I've
been using only "python setup.py install".

Thanks,
robert
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2018-06-25 Thread Petter S


Petter S  added the comment:

I get this error when starting the interpreter in Windows subsystem for Linux 
(WSL). 

I am using Python 2.7.15rc1

$ python --version
Python 2.7.15rc1
$ python
Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time

  OverflowError: timestamp too 
large to convert to C _PyTime_t 



   Current 
thread 0x7fe547231080 (most recent call first): 

  Aborted (core dumped)

--
nosy: +Petter S
versions: +Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33957] use correct term than generic wording

2018-06-25 Thread Srinivas Reddy T


New submission from Srinivas  Reddy T :

I think it is better to use "Big-O notation" than a generic wording "computer 
science notation". I understand  the use of latter, but i guess it helps the 
programmer since it makes him/her to google it or ask some one if he/she didn't 
know it yet.

--
assignee: docs@python
components: Documentation
messages: 320433
nosy: docs@python, thatiparthy
priority: normal
pull_requests: 7515
severity: normal
status: open
title: use correct term than generic wording
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Where's the junk coming from?

2018-06-25 Thread José María Mateos
On Sun, Jun 24, 2018 at 09:39:33PM +0100, Mark Lawrence wrote:
> Hi folks,
> 
> In the last hour or so I've seen via thunderbird and gmane around 15
> emails from various people where the from field is
> name@1261/38.remove-r7u-this.  The part after the @ symbol never
> changes.  I've seen the contents previously, apart from one from the
> RUE.  Users' complete email addresses are given right at the top.
> What gives?

Same for me. Could it be a news to mailing list gateway? I've found this 
header in some of the offending messages:

X-Gateway: castlerockbbs.com [Synchronet 3.17a-Linux NewsLink 1.108]

Cheers,

-- 
José María (Chema) Mateos
https://rinzewind.org/blog-es || https://rinzewind.org/blog-en
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Static variables [was Re: syntax difference]

2018-06-25 Thread Grant Edwards
On 2018-06-24, Steven D'Aprano  wrote:

> Building functions is cheap. Cheap is not free.
>
> Inner functions that aren't exposed to the outside cannot be tested
> in isolation, you can't access them through help()
> interactively. Given the choice between:

[...]

> so not expensive, but not free either. If using an inner function
> has no advantages to you, why pay that tiny cost for no benefit?

The benefit of an inner function is that it makes it perfectly clear
to the reader that that function is not used outside the function
where it is defined.  It also makes it more difficult for other
fuctions to muck things up by changing the binding of a global name.

IOW, you use a local function instead of a global one for the exact
same reasons you use local "variables" instead of global ones.

In Python, functions are first class objects.  Binding a name to a
function is no different than binding it to an integer, list, string,
or dict.  Don't the global vs. local cost vs. benefit calculations
apply equally well to function objects as they do to those other sorts
of objects?

-- 
Grant Edwards   grant.b.edwardsYow! I'm a nuclear
  at   submarine under the
  gmail.compolar ice cap and I need
   a Kleenex!

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-25 Thread Bart
  To: boB Stepp
From: Bart 

On 24/06/2018 16:37, boB Stepp wrote:
> On Sun, Jun 24, 2018 at 5:21 AM Bart  wrote:

> "... And of course, you would have to know how to use Python properly in
> idiomatic style.

No. I want to program in /my/ style, one more like the pseudo-code that was
mentioned elsewhere, and that is universally understood. Even if people here
don't think much of it.

(eg. https://pastebin.com/0EygJzFR, raw text:https://pastebin.com/raw/0EygJzFR)

   Why not choose this positive approach?  I think it
> would be a win-win for both you and Python."
>
> Just show you genuinely care about the language and the community.
> Use and understand the language as well as you can before jumping into
> criticisms.  Adopt the path of the humble learner, who does not know
> everything about Python.  Is this too much to ask?

Sorry, I tried a few replies but they all got too long and too much about me.
So I'll have to leave it.

I think people know enough about my ideas by now anyway.

--
bart

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2018-06-25 Thread Petter S


Petter S  added the comment:

For Python 3:

$ python3 --version
Python 3.7.0b3
$ python3
Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time
OverflowError: timestamp too large to convert to C _PyTime_t

Current thread 0x7f0232c21080 (most recent call first):
Aborted (core dumped)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: moving to Python from Java/C++/C

2018-06-25 Thread Chris Angelico
On Tue, Jun 26, 2018 at 2:35 AM, Dan Stromberg  wrote:
> On Mon, Jun 25, 2018 at 3:40 AM,  wrote:
>
>> Hey,
>> I already have quite an experience in programming, and I wish to study
>> Python as well. I need to study it before I continue with my comp. science
>> academic studies.
>> How do you recommend studying it? As mentioned in the headline, I already
>> know Java, C++ and C.
>>
> I recommend https://wiki.python.org/moin/BeginnersGuide/Programmers
>
> Full disclosure: I wrote the "Intro to Python" slide deck.
>
> And yes, in 2018, you probably should study Python 3, not Python 2.

Yes. I'd upgrade the "probably" to "definitely".

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for beginners or not? [was Re: syntax difference]

2018-06-25 Thread Abdur-Rahmaan Janhangeer
From: Abdur-Rahmaan Janhangeer 

see for example

https://en.m.wikipedia.org/wiki/Bresenham%27s_line_algorithm

see the pseudocode, i was implementing some raster algos when i found myself
aux anges

so close to py. i guess it was written in prehistoric times with the author
trying to simplify stuffs

Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ


>

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Anyone here on Python-Dev mailing list?

2018-06-25 Thread Abdur-Rahmaan Janhangeer
From: Abdur-Rahmaan Janhangeer 

i follow the dev list so far no

but that particular mail might be related to pythan rather than random messages

over the times i've talked to users of other langs (academics) one of the fault
 they find with python is the virtual env setup, too boring a task.

environment in that case may refer to python environment

Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ


>

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33774] Document that @lru_cache caches based on exactly how the function arguments are specified

2018-06-25 Thread Srinivas Reddy T


Srinivas  Reddy T  added the comment:

Hi Raymond,
   I find your statement hard to understand.I agree with Solstag, it is 
always helpful to have an example.

+1 for solstag wording.

--
nosy: +thatiparthy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30237] Access violation due to CancelSynchronousIo of console read

2018-06-25 Thread Valeriya Sinevich


Change by Valeriya Sinevich :


--
keywords: +patch
pull_requests: +7514
stage: test needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Anyone here on Python-Dev mailing list?

2018-06-25 Thread Steven D'Aprano
From: Steven D'Aprano 

Anyone on the Python-Dev mailing list, are you getting private emails
containing nothing but stream of consciousness word-salad from somebody (some
bot?) calling himself "Chanel Marvin" with a gmail address?

Typical example:

"I refuse to create my environment on a computer. Stalls and static
and it always looks fake unless I can afford all the cool fast stuff
like Prometheus speed but for dummies in plain white english"

in reply to an email I posted to the list.

I don't want to ask there, yet, in case it isn't a bot but some nutter with an
attitude emailing me privately.



--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing it everywhere."
 -- Jon Ronson

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for beginners or not? [was Re: syntax difference]

2018-06-25 Thread Chris Angelico
From: Chris Angelico 

On Mon, Jun 25, 2018 at 2:23 AM, Abdur-Rahmaan Janhangeer
 wrote:
> Python is rightly called executable pseudocode. i appreciated the fact that
> you can go on wikipaedia, find the pseudocode of algorithms remove curly
> braces and replace by py's more powerful  syntax and poof, suddenly it
> becomes too easy.

My pseudocode and Python code look extremely similar, but that's partly
*because* I know Python. But I do periodically have JavaScript students ask me
"Is that Python?" when what I've written is pseudocode.

ChrisA

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-25 Thread Chris Angelico
From: Chris Angelico 

On Mon, Jun 25, 2018 at 1:02 AM, Steven D'Aprano
 wrote:
> On Mon, 25 Jun 2018 00:46:00 +1000, Chris Angelico wrote:
>
>> On Sun, Jun 24, 2018 at 8:40 PM, Steven D'Aprano
>>  wrote:
>>> On Sun, 24 Jun 2018 11:18:37 +0100, Bart wrote:
>>>
 I wonder why it is just me that constantly needs to justify his
 existence in this group?
>>>
>>> Because its just you who spends 90% of his time here complaining about
>>> how Python does it wrong.
>>
>> ... and spends 95% of that time demonstrating his utter lack of
>> understanding of how Python does it at all. It's wrong even though you
>> don't understand how it actually works.
>
> Be fair. It's more like 50% of the time.
>
> Let's not dogpile onto Bart. He asked a question, I answered it, we don't
> all need to sink the boot in as well.

Fair. Still, it does seem that most of the criticisms are based on ignorance,
not reasoned disagreement. For instance, I could argue that Python's model of
"variables are local if written to, otherwise they're looked up globally" is a
poor choice, because I have extensively used Python AND other (C-like) models.
Or I could argue that Python really ought to support "foo bar baz"/" " as a
syntax for string splitting, because I've used Python's way of doing things,
and have also used something that works differently. But I cannot argue that
Python should have mutable strings, because I've never used a modern language
that has them, so I don't know what the tradeoffs are. Thus you don't hear me
pushing for it.

ChrisA

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Anyone here on Python-Dev mailing list?

2018-06-25 Thread Steven D'Aprano
From: Steven D'Aprano 

On Mon, 25 Jun 2018 02:15:42 +1000, Chris Angelico wrote:

> On Mon, Jun 25, 2018 at 2:07 AM, Steven D'Aprano
>  wrote:
>> Anyone on the Python-Dev mailing list, are you getting private emails
>> containing nothing but stream of consciousness word-salad from somebody
>> (some bot?) calling himself "Chanel Marvin" with a gmail address?
>>
>> Typical example:
>>
>> "I refuse to create my environment on a computer. Stalls and static
>> and it always looks fake unless I can afford all the cool fast
>> stuff like Prometheus speed but for dummies in plain white english"
>>
>> in reply to an email I posted to the list.
>>
>> I don't want to ask there, yet, in case it isn't a bot but some nutter
>> with an attitude emailing me privately.
>>
>>
> Yeah, I got one of those. I'm pretty sure it's a Markov chainer.

Only one? So far I've had seven.

I get spam bots trying to flush out suckers. I don't get bots that send out
random messages to random people. Why?



--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing it everywhere."
 -- Jon Ronson

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-25 Thread Steven D'Aprano
From: Steven D'Aprano 

On Sun, 24 Jun 2018 16:39:19 +0100, Bart wrote:

> More like utter disbelief at how it works. Surely it cannot work like
> that because it would be too inefficient? Apparently, yes it can...

Apparently, no it doesn't, because the fact that Python is used by tens of
thousands of programmers for some mighty big, performance-critical, projects
proves that it isn't "too inefficient". Its efficient enough.

You want C, and all the headaches and buffer overflows and seg faults it gives,
 you know where to find it.


> I know I'm going to get flak for bringing this up this old issue,

And yet you're going to do it anyway.

> but
> remember when you used to write a for-loop and it involved creating an
> actual list of N integers from 0 to N-1 in order to iterate through
> them? Crazy.

That's nothing, there are languages where the standard way to write a for loop
is to call an external program that generates a stream of numeric strings
separated by spaces in a subprocess, and read the strings from standard input
as text.



--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing it everywhere."
 -- Jon Ronson

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-25 Thread boB Stepp
From: boB Stepp 

On Sun, Jun 24, 2018 at 5:21 AM Bart  wrote:
>
> On 24/06/2018 00:44, boB Stepp wrote:
> > On Sat, Jun 23, 2018 at 5:35 PM Bart  wrote:
>
> >> I'm not a user...
> >
> > Then I am truly puzzled, Bart.  Why do you even bother to hang out on
> > this list?  If you do not want to use Python and you do not want to
> > improve Python's design and implementation, what is your point of
> > being here?
>
> I wonder why it is just me that constantly needs to justify his
> existence in this group?

You snipped the unpleasant part of my paragraph: "... You *do* seem to generate
 a lot of ill will, I hope unintentionally..."

> Does someone need to be that much of a user of a language in order
> to discuss its design or its features or its efficiency, or how it
> compares with any other? You can do that from without as well as
> from within.

I don't dispute this.  But there are good ways to do this and there are bad
ways to do this.  You seem to fall into the latter category enough that at a
minimum you irritate people who care very deeply about Python, and, at worst,
outright enrage some.



> As for why Python, it's the dynamic language I'm most familiar
> with, and I've been following it since the 1990s.

And this gets to the crux of the matter.  If this is so, why is it that you
repeatedly demonstrate a lack of understanding of the very things you are
critiquing?  I cannot recall how many times you have been called out on this
point, but it is certainly not an uncommon event.  It is one thing to have
demonstrable technical understanding of one or more concepts, and critique
those concepts with valid, or at least, interesting points, but it is entirely
another thing to be criticizing (How you are often perceived.) something in
Python while at the same time demonstrating you don't really understand the
particular Pythonic implementation or usage you are criticizing. Don't you see
the difference?  Don't you see what it is that so riles people?  But things do
not have to be this way!  As I said later in my paragraph I have been
referencing:

"... But why not take a different, more helpful tack? You seem to have a lot of
 ideas.  If you really think they are applicable to improving the Python
language, why not take your ideas, one at a time, and have serious discussion,
perhaps better on Python-Ideas, on how Python can be meaningfully made better? 
 That would be a helpful approach which I think, if done with the intention of
helping Python to be the best language it can be (Within the constraints it has
 to operate within in practice.), then I would hope your potential
contributions would be positively received by the community..."

And:

"... And of course, you would have to know how to use Python properly in
idiomatic style.  Why not choose this positive approach?  I think it would be a
 win-win for both you and Python."

Just show you genuinely care about the language and the community. Use and
understand the language as well as you can before jumping into criticisms. 
Adopt the path of the humble learner, who does not know everything about
Python.  Is this too much to ask?



--
boB

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-25 Thread Rick Johnson
  To: Steven D'Aprano
From: Rick Johnson 

On Sunday, June 24, 2018 at 10:05:14 AM UTC-5, Steven D'Aprano wrote: [...]
> Be fair. It's more like 50% of the time. Let's not dogpile
> onto Bart. He asked a question, I answered it, we don't all
> need to sink the boot in as well.

And why am i _not_ surprised to learn that Steven defines "community" as
kicking and dogpiling others 50% of the time.

Well, at least it wasn't 100%...

Eh? o_O

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python for beginners or not? [was Re: syntax difference]

2018-06-25 Thread Abdur-Rahmaan Janhangeer
From: Abdur-Rahmaan Janhangeer 

Python is rightly called executable pseudocode. i appreciated the fact that you
 can go on wikipaedia, find the pseudocode of algorithms remove curly braces
and replace by py's more powerful  syntax and poof, suddenly it becomes too
easy.

Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ

>
>

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: syntax difference

2018-06-25 Thread Steven D'Aprano
From: Steven D'Aprano 

On Mon, 25 Jun 2018 00:46:00 +1000, Chris Angelico wrote:

> On Sun, Jun 24, 2018 at 8:40 PM, Steven D'Aprano
>  wrote:
>> On Sun, 24 Jun 2018 11:18:37 +0100, Bart wrote:
>>
>>> I wonder why it is just me that constantly needs to justify his
>>> existence in this group?
>>
>> Because its just you who spends 90% of his time here complaining about
>> how Python does it wrong.
>
> ... and spends 95% of that time demonstrating his utter lack of
> understanding of how Python does it at all. It's wrong even though you
> don't understand how it actually works.

Be fair. It's more like 50% of the time.

Let's not dogpile onto Bart. He asked a question, I answered it, we don't all
need to sink the boot in as well.

Nobody expects Bart to love Python, but if he wants to fit in here, in a Python
 group, he ought to either at least make an effort to understand the reasons
Python is what it is (and not just idiocy and bloat) and appreciate it for what
 it is, not for what it isn't. Or at least avoid trying to lecture us on why
we're doing it wrong.



--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing it everywhere."
 -- Jon Ronson

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Anyone here on Python-Dev mailing list?

2018-06-25 Thread Chris Angelico
From: Chris Angelico 

On Mon, Jun 25, 2018 at 2:07 AM, Steven D'Aprano
 wrote:
> Anyone on the Python-Dev mailing list, are you getting private emails
> containing nothing but stream of consciousness word-salad from somebody
> (some bot?) calling himself "Chanel Marvin" with a gmail address?
>
> Typical example:
>
> "I refuse to create my environment on a computer. Stalls and static
> and it always looks fake unless I can afford all the cool fast stuff
> like Prometheus speed but for dummies in plain white english"
>
> in reply to an email I posted to the list.
>
> I don't want to ask there, yet, in case it isn't a bot but some nutter
> with an attitude emailing me privately.
>

Yeah, I got one of those. I'm pretty sure it's a Markov chainer.

ChrisA

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Introducing Coconut

2018-06-25 Thread justin walters
From: justin walters 

On Sun, Jun 24, 2018 at 5:51 AM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:

> Coconut, the functional programming language which compiles to Python:
>
> http://coconut.readthedocs.io/en/master/FAQ.html
>
> http://coconut-lang.org/
>
> (Its not my language. I just think its cool.)
>
>
> --
> Steven D'Aprano
> "Ever since I learned about confirmation bias, I've been seeing
> it everywhere." -- Jon Ronson
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>


As someone who has been studying Elixir and Phoenix lately, This is pretty
neat.

There have definitely been some pieces of my Python projects that could have
benefited from a
Functional structure.

I don't think writing an entire project in Cocounut would be worth while. At
that point, why not use an actual FP language? However, I do think it sounds
useful for when certain parts of a project could be cleaned up
or optimized with functional code. Almost like a better `functools`.

All that said though, I am interested to see performance metrics for the
transpiled python.

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Introducing Coconut

2018-06-25 Thread Abdur-Rahmaan Janhangeer
From: Abdur-Rahmaan Janhangeer 

hum syntactic coating exists even in py. nice!

Abdur-Rahmaan Janhangeer
https://github.com/Abdur-rahmaanJ


>
>

--- BBBS/Li6 v4.10 Toy-3
 * Origin: Prism bbs (1:261/38)
-- 
https://mail.python.org/mailman/listinfo/python-list


  1   2   3   >