Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Random832


On Sun, Apr 17, 2016, at 01:01, eryk sun wrote:
> It doesn't support fonts that mix half-width and full-width glyphs.

This is the most baffling bit to me. I mean, it _has_ to, for Chinese,
Japanese, and Korean users. This support obviously exists in the code.
Why not extend it to everyone, instead of maintaining two versions of
whatever it's doing?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread eryk sun
On Sat, Apr 16, 2016 at 8:30 PM, Tim Chase
 wrote:
> On 2016-04-16 19:39, eryk sun wrote:
>> On Sat, Apr 16, 2016 at 4:50 PM, Tim Chase wrote:
>> > I also do some editing/diffing within a cmd.exe window on Windows
>> > which is limited to 80 characters unless you do some hijinks in
>> > the settings to expand it.
>>
>> Try `mode con cols=120 lines=30`.
>
> Yeah, that will do it, as will going into the settings and changing
> it. But basically every other program on Windows, and every console
> on Linux/BSD/Mac will let me resize a terminal running while another
> program is running.  For a cmd.exe window, I have to quit, issue the
> `mode` command, restart my application, and return to where I was.

cmd.exe doesn't own a window. You probably meant the console
host/server, conhost.exe. cmd has handles for StandardInput,
StandardOutput, and StandardError -- which may be handles for console
I/O, but not necessarily.

I agree that the classic console window has a bad UI. It can only be
resized up to the size of the screen buffer, which is not terribly
useful. There's no way to change the screen buffer size when manually
sizing the window. You have to either use the properties dialog or the
API. In Python you can run mode.com via subprocess.call('mode.com con
cols=120'). Or you can use ctypes to call GetConsoleScreenBufferInfoEx
and SetConsoleScreenBufferInfoEx.

The Windows 10 console is a significant step in the right direction.
It automatically resizes the screen buffer with text wrapping, selects
a text stream instead of a rectangle, and uses regular keyboard
shortcuts such as Ctrl+C and Ctrl+V for copy and paste. It still has
room for improvement, however. It doesn't support fonts that mix
half-width and full-width glyphs. It can't display characters that use
multiple WCHAR values, such as astral characters (UTF-16 surrogate
pairs) and decomposed characters. It doesn't support ANSI/VT100
terminal emulation (but maybe this is in the works for the new Linux
subsystem).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Installation problem

2016-04-16 Thread boB Stepp
On Sat, Apr 16, 2016 at 2:16 PM, Jurell  wrote:


> I installed the Python program version 3.5.1 32 bit and the IDE I am going
> to use is Wing IDE 101. The problem when I tried installing the python
> program was as follows: "The program can`t start because
> api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try
> reinstalling the program to fix this problem". What I did was uninstall
> Python and reinstall it installed ,I proceed on to install the IDE then this
> message appeared again.

These sorts of questions get asked by many people.  When I have an
error message that I cannot figure out I do an Internet search for
that error message.  But since this is a Python-related question, I
might first search the Python list archives at
https://www.mail-archive.com/python-list@python.org/ or the Python
Tutor list archives at https://www.mail-archive.com/tutor@python.org/
Doing the former (Searching just for
"api-ms-win-crt-runtime-l1-1-0.dll") led me to this:
https://www.mail-archive.com/python-list%40python.org/msg402592.html
I have not looked at this in depth, but the second item mentioned
(Since you state you have Win 7 64 bit.) seems appropriate.  Usually I
can solve my own problems much quicker this way than waiting on
someone to respond on this (or other) mailing lists!

BTW, if you are a beginner learning Python you might want to subscribe
to the Python Tutor list as it is designed for those of us who are
learning...

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


Re: error with tkinter, help

2016-04-16 Thread Terry Reedy

On 4/16/2016 9:31 PM, blueridicul...@gmail.com wrote:

So I was reading https://wiki.python.org/moin/TkInter for help.

> I got to step 3 under "Checking your Tkinter support."
> Nothing happens when I do steps 1 or 2, and when I do step 3,
> I get this error:


Traceback (most recent call last):
  File "", line 301, in runcode
  File "", line 1, in 
  File "C:\Python34\lib\tkinter\__init__.py", line 3882, in _test
root = Tk()
  File "C:\Python34\lib\tkinter\__init__.py", line 1856, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, 
wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
C:/Python34/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library 
C:/tcl8.6.1/library C:/tcl8.6.1/library

This probably means that Tcl wasn't installed properly.
"


The directory list is obsolete.  You should have C:/Python34/tcl
How did you install Python?  The Windows PSF installer from python.org 
will create this directory unless you uncheck the box to include tcl/tk.


--
Terry Jan Reedy

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


Re: Fraud

2016-04-16 Thread Mario R. Osorio
Mel: Portuguese for honey
Drosis: from Greek hidrōs; to sweat
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-04-16 Thread Martin Panter

Changes by Martin Panter :


--
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: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Dan Sommers
On Sun, 17 Apr 2016 11:48:11 +1000, Steven D'Aprano wrote:

> On Sun, 17 Apr 2016 09:35 am, Dan Sommers wrote:
> 
>> We (this mailing list, or maybe it was the python-ideas mailing list)
>> just had a thread about non-ASCII characters in identifiers.  One of
>> the main argument against is the confusables (A vs Α vs А).
>> Sufficient tooling, however, could render (pun intended) that
>> argument moot.  Not too long ago, one of the main arguments against
>> was that not everyone's tools could even render Α or А.
> 
> Technically speaking, they still might not. My editor can render both
> Cyrillic and Greek characters, but does a terrible job at Chinese and
> Korean because I don't have the font support. So all I see is a series
> of "missing character" boxes. There may be folks who don't have
> installed fonts that support Cyrillic or Greek.

I think we're agreeing.  Not everyone's tools render the same source
code the same way, which means that at least some part of readability
depends on the tools people use.

People who use screen readers rather than visual displays probably
wonder why the rest of us can't tell our "l"s from our "1"s and our "O"s
from our "0"s.

If PEP8 is about readability, then it should dispell the myth that
everyone perceives source code the same way through the same tools.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26782] subprocess.__all__ incomplete on Windows

2016-04-16 Thread Martin Panter

Changes by Martin Panter :


--
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: Guido sees the light: PEP 8 updated

2016-04-16 Thread Chris Angelico
On Sun, Apr 17, 2016 at 1:44 PM, Rustom Mody  wrote:
> Thats a strange self-contradiction.  I wrote this:
>  http://blog.languager.org/2012/10/layout-imperative-in-functional.html
> to make the case against PEP8 style line length strictures.
> Which has the SAME code formatted in two styles:
>
> --  < 80 cols, 48 lines
> --  115 cols 37 lines
>
> Clearly the 115 cols is MORE fittable in a page than the 80 cols
> [Though my argument for that is based on other structural/semantic principles]

There are certain specific situations where 80 (79) is the correct
width to aim for, but even if you aren't going for that, there's still
the general principle that longer lines are harder to read. So maybe
you declare that your codebase is allowed to go to 100, or 120, but
you don't want to let it run to 2048. No matter WHAT screen you're on,
that's too wide!

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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Rustom Mody
On Saturday, April 16, 2016 at 10:22:10 PM UTC+5:30, Marko Rauhamaa wrote:
> Larry Martell :
> 
> > I have worked for many companies where you are required to get a clean
> > run of pep8 on your code before your pull request will even be
> > considered for approval. I don't agree with this at all, as I think it
> > makes the code very ugly, especially enforcing the max line length.
> 
> Agh, I was with you until your last remark.


Count me in the "80-chars is ante-deluvian gunk" camp

> 
> A max line length of 79 characters is among the *only* rigorous
> principles I judge coding style on.
> 
> It comes with the maxim that one function must be visible at once on the
> screen.

Thats a strange self-contradiction.  I wrote this:
 http://blog.languager.org/2012/10/layout-imperative-in-functional.html
to make the case against PEP8 style line length strictures.
Which has the SAME code formatted in two styles:

--  < 80 cols, 48 lines
--  115 cols 37 lines

Clearly the 115 cols is MORE fittable in a page than the 80 cols
[Though my argument for that is based on other structural/semantic principles]

Should mention an irony here though:
When I first wrote it, the examples were inline and blogger was breaking the 
lines randomly completely invalidating my point.
IIRC blogger was breaking at 68 cols -- invalidating the 80 cols from the other 
side.
Clearly 80 cols is more portable than longer.
However if we literally implement the view that different people use different
technologies -- AND WE SHOULD SUPPORT THEM ALL -- then notepad becomes the
ineluctable gold standard.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26554] PC\bdist_wininst\install.c: Missing call to fclose()

2016-04-16 Thread Josh Snider

Josh Snider added the comment:

I suggested some changes to your patch. Your patch should also add your name to 
the Misc/ACKS file as I don't currently see an Aatish listed there.

--
nosy: +Josh Snider

___
Python tracker 

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



[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1f2cfcd5a83f by Martin Panter in branch '3.5':
Issue #26717: Stop encoding Latin-1-ized WSGI paths with UTF-8
https://hg.python.org/cpython/rev/1f2cfcd5a83f

New changeset 815a4ac67e68 by Martin Panter in branch 'default':
Issue #26717: Merge wsgiref fix from 3.5
https://hg.python.org/cpython/rev/815a4ac67e68

--
nosy: +python-dev

___
Python tracker 

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



Introducing the secrets module

2016-04-16 Thread Steven D'Aprano
I'm pleased to announce a new standard library module for Python 3.6 and
better, to aid in generating secure tokens for authentication and other
secrets.

Last year, the founder of OpenBSD Theo de Raadt contacted Guido van Rossum
with concerns that the Python standard library made it too easy for people
to generate insecure tokens, session keys and related data.

The problem is that developers may use the random module for generating
tokens which need to be hard to guess. However the random module uses the
Mersenne Twister by default, which is designed for simulation and modelling
and is not suitable for cryptographic purposes. Consequently such tokens
may be insecure.

After much discussion, it was decided to leave the random module as-is, but
introduce a new module which would can be used to generate hard-to-guess
(cryptographically strong) tokens and random numbers: the secrets module.

See the PEP for more details:

https://www.python.org/dev/peps/pep-0506/

And the documentation:

https://docs.python.org/3.6/library/secrets.html


Comments requested.



-- 
Steven

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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Random832
On Sat, Apr 16, 2016, at 21:30, Tim Chase wrote:
> On 2016-04-16 19:39, eryk sun wrote:
> > On Sat, Apr 16, 2016 at 4:50 PM, Tim Chase wrote:
> > > I also do some editing/diffing within a cmd.exe window on Windows
> > > which is limited to 80 characters unless you do some hijinks in
> > > the settings to expand it.
> > 
> > Try `mode con cols=120 lines=30`.
> 
> Yeah, that will do it, as will going into the settings and changing
> it. But basically every other program on Windows, and every console
> on Linux/BSD/Mac will let me resize a terminal running while another
> program is running.  For a cmd.exe window, I have to quit, issue the
> `mode` command, restart my application, and return to where I was.

Well, if your interactive application allows you to run commands within
it, you don't have to quit. Plus you can always go into the settings
window, I don't know what's "hijinks" about that.

I heard Windows 10 is going to finally fix this, anyway.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Steven D'Aprano
On Sun, 17 Apr 2016 09:35 am, Dan Sommers wrote:

> We (this mailing list, or maybe it was the python-ideas mailing list)
> just had a thread about non-ASCII characters in identifiers.  One of the
> main argument against is the confusables (A vs Α vs А).  Sufficient
> tooling, however, could render (pun intended) that argument moot.  Not
> too long ago, one of the main arguments against was that not everyone's
> tools could even render Α or А.

Technically speaking, they still might not. My editor can render both
Cyrillic and Greek characters, but does a terrible job at Chinese and
Korean because I don't have the font support. So all I see is a series
of "missing character" boxes. There may be folks who don't have installed
fonts that support Cyrillic or Greek.



-- 
Steven

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


Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Steven D'Aprano
On Sun, 17 Apr 2016 06:44 am, Random832 wrote:

> On Sat, Apr 16, 2016, at 16:21, Ben Finney wrote:
>> * Oh, come on, no-one would use U+000C FORM FEED in source code.
> 
> Some text editors have shortcuts to navigate to the previous/next line
> that begins with a form feed.

Are you saying that's a falsehood?


-- 
Steven

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


[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eef8f72ddb00 by Martin Panter in branch '2.7':
Issue #4806: Avoid masking TypeError when *-unpacking a generator
https://hg.python.org/cpython/rev/eef8f72ddb00

--

___
Python tracker 

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



error with tkinter, help

2016-04-16 Thread blueridiculous
So I was reading https://wiki.python.org/moin/TkInter for help. I got to step 3 
under "Checking your Tkinter support." Nothing happens when I do steps 1 or 2, 
and when I do step 3, I get this error:

"
Traceback (most recent call last):
  File "", line 301, in runcode
  File "", line 1, in 
  File "C:\Python34\lib\tkinter\__init__.py", line 3882, in _test
root = Tk()
  File "C:\Python34\lib\tkinter\__init__.py", line 1856, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, 
wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
C:/Python34/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library 
C:/tcl8.6.1/library C:/tcl8.6.1/library



This probably means that Tcl wasn't installed properly.
"

What should I do to get Tkinter working? Sorry if the answer should be obvious 
to me; I am not very experienced with Python.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Tim Chase
On 2016-04-16 19:39, eryk sun wrote:
> On Sat, Apr 16, 2016 at 4:50 PM, Tim Chase wrote:
> > I also do some editing/diffing within a cmd.exe window on Windows
> > which is limited to 80 characters unless you do some hijinks in
> > the settings to expand it.
> 
> Try `mode con cols=120 lines=30`.

Yeah, that will do it, as will going into the settings and changing
it. But basically every other program on Windows, and every console
on Linux/BSD/Mac will let me resize a terminal running while another
program is running.  For a cmd.exe window, I have to quit, issue the
`mode` command, restart my application, and return to where I was.

-tkc



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


Re: Fraud

2016-04-16 Thread Steven D'Aprano
On Sun, 17 Apr 2016 03:12 am, Mel Drosis wrote:

> 
> My phone my accounts my home network have all been affected because of
> someone using coding from Python and Linux and GitHub and json. I don't
> even know what this stuff is but how do I get rid of it all. It's ruined
> my life. Sent from my iPhone

Go to Russia.

Find a corrupt Russian general.

Purchase the biggest nuclear warhead you can afford, at least 20 megatons.

Launch it into space and detonate it in near-Earth orbit.

When the radiation hits the atmosphere, it will generate the mother of all
electromagnetic pulses.

Which will permanently fry all computer chips and most electronics all over
the world, sending the entire planet back to pre-Industrial Revolution
technology.

(You may need to do it twice, once for each hemisphere.)

Which is the only way to get rid of the scourge of "Python and Linux and
GitHub and json" once and for all.



-- 
Steven

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


Re: sys.exit(1) vs raise SystemExit vs raise

2016-04-16 Thread Steven D'Aprano
On Sun, 17 Apr 2016 02:09 am, Dennis Lee Bieber wrote:


> VMS had a whole slew of "no error" status values (essentially all
> positive odd integers were "success", but different values carried
> additional information. 

1 = success
3 = success against all odds
5 = success but at great cost
7 = success, and it was as easy as falling off a log
9 = success, and it was so easy you ought to be ashamed for
asking the computer to do it instead of doing it yourself
11 = I told you I already did it yesterday
13 = done, but it wasn't worth doing
15 = well that was easier than I expected
17 = that was harder than I expected
19 = I did it, but I'm not going to do it again

> Even integers were errors [I forget if positive or 
> negative were "warnings" vs "error"])
> 
> True, the simplest was "1", which just carried "success -- no
> additional details" and "0" was "unspecified failure".



-- 
Steven

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


Re: Fraud

2016-04-16 Thread Random832
On Sat, Apr 16, 2016, at 20:20, Joel Goldstick wrote:
> As it turns out, the OP hasn't engaged in any further back and forth,
> which to me enforces my original post.

It's entirely possible he's not subscribed to the mailing list.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Ben Bacarisse
Chris Angelico  writes:

> On Sun, Apr 17, 2016 at 9:25 AM, Ben Bacarisse  wrote:
>> Dennis Lee Bieber  writes:
>> 
>>>   I still miss the Amiga -- in which one could /push/ a window to the
>>> back of the stack while still retaining input focus! Made it nice for
>>> transcribing stuff from a visible window to a text input region while it
>>> was obscured.
>>
>> That was commonly available on Unix window managers and is still around.
>> I use it on even an up-to-date Linux/Gnome3 system (you set focus
>> follows mouse rather than focus on click).
>
> Focus follows mouse is annoying for other reasons though.

Sure.  But if you want it only sometimes you can bind a key to turn it
on or off so you can have it only momentarily.

The other way is to bind a key (if not already bound) to the "lower
winder" action.  That won't (or shouldn't) alter the focus and will push
the window under the one you want to see.

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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread MRAB

On 2016-04-17 00:11, Chris Angelico wrote:

On Sun, Apr 17, 2016 at 9:02 AM, Dennis Lee Bieber
 wrote:

I still miss the Amiga -- in which one could /push/ a window to the
back of the stack while still retaining input focus! Made it nice for
transcribing stuff from a visible window to a text input region while it
was obscured.


OS/2 could do the same thing. I've tried to mess with it in various
Linux desktops, but haven't really found what I want.


You could also do that on Acorn's RISC OS.

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


[issue23883] __all__ lists are incomplete

2016-04-16 Thread Martin Panter

Changes by Martin Panter :


--
dependencies: +subprocess.__all__ incomplete on Windows

___
Python tracker 

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



[issue26778] More typo fixes

2016-04-16 Thread Martin Panter

Martin Panter added the comment:

I think there are two outstanding problems; see Lib/tkinter/tix.py and 
Misc/HISTORY.

--

___
Python tracker 

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



Re: Fraud

2016-04-16 Thread Joel Goldstick
On Sat, Apr 16, 2016 at 7:49 PM, Gene Heskett  wrote:
> On Saturday 16 April 2016 18:02:50 Joel Goldstick wrote:
>
>> On Sat, Apr 16, 2016 at 5:23 PM, Chris Angelico 
> wrote:
>> > On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list
>> >
>> >  wrote:
>> >> My phone my accounts my home network have all been affected because
>> >> of someone using coding from Python and Linux and GitHub and json.
>> >> I don't even know what this stuff is but how do I get rid of it
>> >> all. It's ruined my life.
>> >
>> > You don't need Python help after an attack like this any more than
>> > you need an automotive mechanic after you've been run over by a car.
>> > What you need is someone who can help you repair your systems and
>> > fix your security; I suggest looking locally in your area for a
>> > computer expert.
>> >
>> > ChrisA
>> > --
>> > https://mail.python.org/mailman/listinfo/python-list
>>
>> Help, I've fallen down and I can't reach my beer!
>>
>> Sorry :(
>>
> I haven't fallen, and I can reach my beer, but in this factless post,
> beer doesn't help. :)
>
>> I'm curious as to what makes you think all this trouble was caused by
>> python, etc.  Did they leave a note?
>>
>> --
>> Joel Goldstick
>> http://joelgoldstick.com/blog
>> http://cc-baseballstats.info/stats/birthdays
>
>
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page 
> --
> https://mail.python.org/mailman/listinfo/python-list

Sorry Gene, but I'm a long time reader and sometimes contributor to
this list, and there are some things that are just a bit nutty.  I
imagine that this post is from someone who really is upset, but his
response to the list is really a bit silly in my opinion.  It isn't
about python, so I thought I'd be light hearted.

As it turns out, the OP hasn't engaged in any further back and forth,
which to me enforces my original post.

-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Tim Chase
On 2016-04-16 19:02, Dennis Lee Bieber wrote:
>   I still miss the Amiga -- in which one could /push/ a
> window to the back of the stack while still retaining input focus!
> Made it nice for transcribing stuff from a visible window to a text
> input region while it was obscured.

What OS (or if X-based, which window-manager) do you use?  I have

  Mod4 Next :LowerLayer
  Mod4 Prior :RaiseLayer

in my ~/.fluxbox/keys configuration which lets me use the logo key
with pageup/pagedown to raise/lower the focus of the current window.
I find that most of the time I want to raise one particular window
above all other windows (most of the time I end up closing it when
done, but sometimes I want to lower it back down to the main
application layer).

-tkc


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


Re: Fraud

2016-04-16 Thread Gene Heskett
On Saturday 16 April 2016 18:02:50 Joel Goldstick wrote:

> On Sat, Apr 16, 2016 at 5:23 PM, Chris Angelico  
wrote:
> > On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list
> >
> >  wrote:
> >> My phone my accounts my home network have all been affected because
> >> of someone using coding from Python and Linux and GitHub and json.
> >> I don't even know what this stuff is but how do I get rid of it
> >> all. It's ruined my life.
> >
> > You don't need Python help after an attack like this any more than
> > you need an automotive mechanic after you've been run over by a car.
> > What you need is someone who can help you repair your systems and
> > fix your security; I suggest looking locally in your area for a
> > computer expert.
> >
> > ChrisA
> > --
> > https://mail.python.org/mailman/listinfo/python-list
>
> Help, I've fallen down and I can't reach my beer!
>
> Sorry :(
>
I haven't fallen, and I can reach my beer, but in this factless post, 
beer doesn't help. :)

> I'm curious as to what makes you think all this trouble was caused by
> python, etc.  Did they leave a note?
>
> --
> Joel Goldstick
> http://joelgoldstick.com/blog
> http://cc-baseballstats.info/stats/birthdays


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26785] repr of -nan value should contain the sign

2016-04-16 Thread Eric V. Smith

Eric V. Smith added the comment:

Changing versions.

I left in 2.7, but I doubt we'd make any changes to 2.7 with regards to this.

--
versions:  -Python 3.2, Python 3.3

___
Python tracker 

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



[issue26785] repr of -nan value should contain the sign

2016-04-16 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue26782] subprocess.__all__ incomplete on Windows

2016-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 386712b16c74 by Martin Panter in branch '3.5':
Issue #26782: Acknowledge the incomplete status of __all__ in 3.5
https://hg.python.org/cpython/rev/386712b16c74

New changeset 728370e7a29d by Martin Panter in branch 'default':
Issue #26782: Merge test_subprocess from 3.5
https://hg.python.org/cpython/rev/728370e7a29d

New changeset 3e93ac5a7afa by Martin Panter in branch 'default':
Issue #26782: Add STARTUPINFO to subprocess.__all__ on Windows
https://hg.python.org/cpython/rev/3e93ac5a7afa

--
nosy: +python-dev

___
Python tracker 

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



Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread alex wright
The 80 column limit probably helps protect us from the singularity.  Once
the robots take over we will have code with a digestible amount of logic
per line and can fix what we have caused.  In other words, Java is only
armoring the robots against us for the inevitable battle.

On Sat, Apr 16, 2016 at 7:33 PM, Chris Angelico  wrote:

> On Sun, Apr 17, 2016 at 9:25 AM, Ben Bacarisse 
> wrote:
> > Dennis Lee Bieber  writes:
> > 
> >>   I still miss the Amiga -- in which one could /push/ a window to
> the
> >> back of the stack while still retaining input focus! Made it nice for
> >> transcribing stuff from a visible window to a text input region while it
> >> was obscured.
> >
> > That was commonly available on Unix window managers and is still around.
> > I use it on even an up-to-date Linux/Gnome3 system (you set focus
> > follows mouse rather than focus on click).
>
> Focus follows mouse is annoying for other reasons though.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
"On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the
machine wrong figures, will the right answers come out?' I am not able
rightly
to apprehend the kind of confusion of ideas that could provoke such a
question."

-Charles Babbage, 19th century English mathematician, philosopher, inventor
and mechanical engineer who originated the concept of a programmable
computer.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Dan Sommers
On Sun, 17 Apr 2016 07:34:20 +1000, Chris Angelico wrote:

> On Sun, Apr 17, 2016 at 7:22 AM, Dan Sommers  wrote:
>> On Sat, 16 Apr 2016 16:44:30 -0400, Random832 wrote:
>>
>>> On Sat, Apr 16, 2016, at 16:21, Ben Finney wrote:
 * Oh, come on, no-one would use U+000C FORM FEED in source code.
>>>
>>> Some text editors have shortcuts to navigate to the previous/next line
>>> that begins with a form feed.
>>
>> Add these to the list of myths:
>>
>> * All producers use the same tools to produce code.
>> * All consumers use the same tools to consume code.
>> * All entities that produce and consume code use the same tools.
>> * All entities use the same tools to consume code that they do to produce it.
> 
> Those are definitely myths, but are they sufficiently connected to PEP 8?
> 
> ChrisA

PEP8 is all about readability, and we all read source code through one
tool and/or another.  Anecdotally, a lot of readability arguments
(including that one about some text editors treating U+000C as a special
case) end up being as much about the tools we use as they are about the
source code itself.

We (this mailing list, or maybe it was the python-ideas mailing list)
just had a thread about non-ASCII characters in identifiers.  One of the
main argument against is the confusables (A vs Α vs А).  Sufficient
tooling, however, could render (pun intended) that argument moot.  Not
too long ago, one of the main arguments against was that not everyone's
tools could even render Α or А.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Chris Angelico
On Sun, Apr 17, 2016 at 9:25 AM, Ben Bacarisse  wrote:
> Dennis Lee Bieber  writes:
> 
>>   I still miss the Amiga -- in which one could /push/ a window to the
>> back of the stack while still retaining input focus! Made it nice for
>> transcribing stuff from a visible window to a text input region while it
>> was obscured.
>
> That was commonly available on Unix window managers and is still around.
> I use it on even an up-to-date Linux/Gnome3 system (you set focus
> follows mouse rather than focus on click).

Focus follows mouse is annoying for other reasons though.

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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Ben Bacarisse
Dennis Lee Bieber  writes:

>   I still miss the Amiga -- in which one could /push/ a window to the
> back of the stack while still retaining input focus! Made it nice for
> transcribing stuff from a visible window to a text input region while it
> was obscured.

That was commonly available on Unix window managers and is still around.
I use it on even an up-to-date Linux/Gnome3 system (you set focus
follows mouse rather than focus on click).

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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Grant Edwards
On 2016-04-16, Dennis Lee Bieber  wrote:

> I still miss the Amiga -- in which one could /push/ a window to the
> back of the stack while still retaining input focus! Made it nice for
> transcribing stuff from a visible window to a text input region while it
> was obscured.

I do that all the time on Linux. What sort of brain-dead window
manager doesn't allow that?

-- 
Grant



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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Chris Angelico
On Sun, Apr 17, 2016 at 9:02 AM, Dennis Lee Bieber
 wrote:
> I still miss the Amiga -- in which one could /push/ a window to the
> back of the stack while still retaining input focus! Made it nice for
> transcribing stuff from a visible window to a text input region while it
> was obscured.

OS/2 could do the same thing. I've tried to mess with it in various
Linux desktops, but haven't really found what I want.

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


Installation problem

2016-04-16 Thread Jurell
Dear Sir/Madam

 

I installed the Python program version 3.5.1 32 bit and the IDE I am going
to use is Wing IDE 101. The problem when I tried installing the python
program was as follows: "The program can`t start because
api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try
reinstalling the program to fix this problem". What I did was uninstall
Python and reinstall it installed ,I proceed on to install the IDE then this
message appeared again. 

 

N.B: My computer has Windows 7 64bit operating system 

 

I hope that helps .Please help your time and effort will be greatly
appreciated J .Just in case you can`t reach me you can send a message to
tssuk...@gmail.com . Thank you for reading my message ,I hope we can resolve
this issue together J.

 

Yours sincerely

Tiara

 



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26659] slice() leaks memory when part of a cycle

2016-04-16 Thread Martin Panter

Changes by Martin Panter :


--
versions: +Python 3.5

___
Python tracker 

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



Re: how to setup for localhost:8000

2016-04-16 Thread wrh8609
On Friday, April 15, 2016 at 3:04:09 PM UTC-4, Pierre Quentel wrote:
> Le jeudi 14 avril 2016 22:50:33 UTC+2, wrh...@gmail.com a écrit :
> > On Thursday, April 14, 2016 at 2:23:36 PM UTC-4, Andrew Farrell wrote:
> > > What happens when you type
> > > 
> > > http://localhost:8000
> > > 
> > > Into the address bar of your browser as this is running?
> > > 
> > > On Thu, Apr 14, 2016 at 12:46 PM,  wrote:
> > > 
> > > > Hi,
> > > >
> > > > I am working on window 7 and Python 3.5 to setup a localhost:8000 but it
> > > > did not get through as shown below:
> > > > > python -m http.server
> > > > Serving HTTP on 0.0.0.0 port 8000 ...
> > > >
> > > > But it did not show the results.
> > > >
> > > > Can someone help me how to setup the localhost?
> > > >
> > > > Thanks,
> > > > Wen-Ruey
> > > >
> > > > --
> > > > https://mail.python.org/mailman/listinfo/python-list
> > > >
> > 
> > hi Andrew,
> > 
> > Yes. after I type http:\\localhost:8000, the browser did not show anything 
> > except a empty page without any errors.
> > 
> > Thanks,
> > Wen-Ruey
> 
> Hi,
> 
> When you type http://localhost:8000, do you see something in the console 
> after the line  "Serving HTTP on 0.0.0.0 port 8000 ..." ?
> 
> If the server actually serves requests on port 8000 you should see a log 
> message such as
> 
> 127.0.0.1 - - [15/Apr/2016 20:57:32] "GET / HTTP/1.1" 200 -
 Hi Pierre,

When I type http://localhost:8000, I did not see anything in the console after 
the line "Serving HTTP on 0.0.0.0 port 8000 ... I believe the way I ran was not 
correct as shown below:
> python -m http.server 
Serving HTTP on 0.0.0.0 port 8000 ...

Also if I use internet Explorer, it shows HTTP 404 errors.
Do you think the way I am doing of the localhost:8000 setting was not correct?

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


Re: Fraud

2016-04-16 Thread Chris Angelico
On Sun, Apr 17, 2016 at 8:21 AM, Erik  wrote:
> On 16/04/16 23:02, Joel Goldstick wrote:
>>>
>>> On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list
>>>  wrote:


 My phone my accounts my home network have all been affected because of
 someone using coding from Python and Linux and GitHub and json. I don't 
 even
 know what this stuff is but how do I get rid of it all. It's ruined my 
 life.
>
>
>> I'm curious as to what makes you think all this trouble was caused by
>> python, etc.  Did they leave a note?
>
>
> If this is genuine, then I don't want to be dismissive of the plea. However,
> given that Chris's response is quite enough for a genuine request to find a
> solution, I'll say that I smell a feint hint of troll ... :)

It sounds fairly plausible. "Help, I just got 'got'! Now what?"
*researches* "Hmm, I'm seeing a lot of stuff about Python and Linux
and stuff. Where can I get help about Python?"

The request is misdirected (we can't help), but not unreasonable IMO.

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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Marko Rauhamaa
Tim Delaney :

> Personally, I've given up on 80 characters (or even 120 in rare cases)
> for Java code (esp method declarations), where just specifying the
> generics can often take almost that much.

Java generics ruined a perfectly good language. I mean:

Map customersOfAccountManager =
new HashMap();

where classic Java would have:

Map customersOfAccountManager = new HashMap();

and Python simply:

customers_of_account_manager = {}

However, even during my Java years, I didn't give up on the 79-character
religion (see above).


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


Re: Fraud

2016-04-16 Thread Michael Torrie
On 04/16/2016 04:21 PM, Erik wrote:
> On 16/04/16 23:02, Joel Goldstick wrote:
>>> On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list
>>>  wrote:

 My phone my accounts my home network have all been affected because of 
 someone using coding from Python and Linux and GitHub and json. I don't 
 even know what this stuff is but how do I get rid of it all. It's ruined 
 my life.
> 
>> I'm curious as to what makes you think all this trouble was caused by
>> python, etc.  Did they leave a note?
> 
> If this is genuine, then I don't want to be dismissive of the plea. 
> However, given that Chris's response is quite enough for a genuine 
> request to find a solution, I'll say that I smell a feint hint of troll 
> ... :)

Reminds me of this classic story from 10 years ago:
http://www.theregister.co.uk/2006/03/24/tuttle_centos/

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


Re: Fraud

2016-04-16 Thread Erik

On 16/04/16 23:02, Joel Goldstick wrote:

On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list
 wrote:


My phone my accounts my home network have all been affected because of someone 
using coding from Python and Linux and GitHub and json. I don't even know what 
this stuff is but how do I get rid of it all. It's ruined my life.



I'm curious as to what makes you think all this trouble was caused by
python, etc.  Did they leave a note?


If this is genuine, then I don't want to be dismissive of the plea. 
However, given that Chris's response is quite enough for a genuine 
request to find a solution, I'll say that I smell a feint hint of troll 
... :)


E

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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Tim Delaney
On 17 April 2016 at 07:50, Tim Chase  wrote:

> On 2016-04-17 06:08, Ben Finney wrote:
> > Larry Martell  writes:
> > > if we still had 1970's 80 character TTYs that would matter but on
> > > my 29" 1920x1080 screen it doesn't.
> >
> > Larry, you've been around long enough to know that's not an argument
> > against a limited line length for code. It is not about the
> > technology of your terminal. It's about the technology of the brain
> > reading the text.
>
> But just in case you do want to consider hardware limits, I do some
> of my coding on my phone & tablet, both of which are ~80 characters
> wide at best (or less if I use the phone in portrait mode).  I also do
> some editing/diffing within a cmd.exe window on Windows which is
> limited to 80 characters unless you do some hijinks in the settings
> to expand it.
>

Personally, I've given up on 80 characters (or even 120 in rare cases) for
Java code (esp method declarations), where just specifying the generics can
often take almost that much.

But for Python code it's generally fairly easy to break a line in a natural
place.

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


[issue26786] bdist_msi duplicates directories with names in ALL CAPS to a bogus location

2016-04-16 Thread Ivan Pozdeev

New submission from Ivan Pozdeev:

If a package has directories with names in APP CAPS, 
distutils.commands.bdist_msi creates properties for them that are also in all 
caps.

Such properties are handled specially by MSI and are called "public properties 
(http://www.advancedinstaller.com/user-guide/properties.html).

Due to the way bdist_msi-produced .msi's work, this ultimately results in 
subtrees of these directories being duplicated to a bogus location (the root 
directory of the drive on which the .msi being installed is).

E.g. in the attached example, all 
\Lib\mercurial\locale\\LC_MESSAGES subtrees got duplicated to 
D:\Lib\.

See https://bz.mercurial-scm.org/show_bug.cgi?id=5192 for details (including a 
high-level description of how bdist_msi packages work).

--
components: Distutils, Library (Lib), Windows
files: mercurial-3.3.2.log.gz
messages: 263591
nosy: Ivan.Pozdeev, dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: bdist_msi duplicates directories with names in ALL CAPS to a bogus 
location
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42495/mercurial-3.3.2.log.gz

___
Python tracker 

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



Re: Fraud

2016-04-16 Thread Joel Goldstick
On Sat, Apr 16, 2016 at 5:23 PM, Chris Angelico  wrote:
> On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list
>  wrote:
>>
>> My phone my accounts my home network have all been affected because of 
>> someone using coding from Python and Linux and GitHub and json. I don't even 
>> know what this stuff is but how do I get rid of it all. It's ruined my life.
>>
>
> You don't need Python help after an attack like this any more than you
> need an automotive mechanic after you've been run over by a car. What
> you need is someone who can help you repair your systems and fix your
> security; I suggest looking locally in your area for a computer
> expert.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list

Help, I've fallen down and I can't reach my beer!

Sorry :(

I'm curious as to what makes you think all this trouble was caused by
python, etc.  Did they leave a note?

-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
-- 
https://mail.python.org/mailman/listinfo/python-list


Python2.7 win64 --- cannot install the package of scipy

2016-04-16 Thread ykt2271707491
I failed to install the package of scipy on Python2.7(win64).

1. I tried the direct way that use cmd--pip install scripy. The result shows 
that it failed with error code 1 in 
c:\tyk\appdata\local\temp\pip-build-an9fye\scipy\.

2. I tried to install in another way. I download the 
scipy-0.17.0-cp27-none-win_amd64.whl from Unofficial Windows Binaries for 
Python Extension Packages. And use cmd to install that in the Scripts 
direction, but still failed.(I have installed the package wheel already). The 
result shows that scipy-0.17.0-cp27-none-win_amd64.whl is not a supported wheel 
on this platform.

Would someone provide a pointer? Much appreciated!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Tim Chase
On 2016-04-17 06:08, Ben Finney wrote:
> Larry Martell  writes:
> > if we still had 1970's 80 character TTYs that would matter but on
> > my 29" 1920x1080 screen it doesn't.
> 
> Larry, you've been around long enough to know that's not an argument
> against a limited line length for code. It is not about the
> technology of your terminal. It's about the technology of the brain
> reading the text.

But just in case you do want to consider hardware limits, I do some
of my coding on my phone & tablet, both of which are ~80 characters
wide at best (or less if I use the phone in portrait mode).  I also do
some editing/diffing within a cmd.exe window on Windows which is
limited to 80 characters unless you do some hijinks in the settings
to expand it.

-tkc


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


[issue26659] slice() leaks memory when part of a cycle

2016-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 879da9400529 by Benjamin Peterson in branch '2.7':
add gc support to slice (closes #26659)
https://hg.python.org/cpython/rev/879da9400529

New changeset 9e2176d18965 by Benjamin Peterson in branch '3.5':
add gc support to slice (closes #26659)
https://hg.python.org/cpython/rev/9e2176d18965

New changeset 870fcc50f1bd by Benjamin Peterson in branch 'default':
merge 3.5 (#26659)
https://hg.python.org/cpython/rev/870fcc50f1bd

--
nosy: +python-dev
resolution:  -> fixed
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



Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Chris Angelico
On Sun, Apr 17, 2016 at 7:22 AM, Dan Sommers  wrote:
> On Sat, 16 Apr 2016 16:44:30 -0400, Random832 wrote:
>
>> On Sat, Apr 16, 2016, at 16:21, Ben Finney wrote:
>>> * Oh, come on, no-one would use U+000C FORM FEED in source code.
>>
>> Some text editors have shortcuts to navigate to the previous/next line
>> that begins with a form feed.
>
> Add these to the list of myths:
>
> * All producers use the same tools to produce code.
> * All consumers use the same tools to consume code.
> * All entities that produce and consume code use the same tools.
> * All entities use the same tools to consume code that they do to produce it.

Those are definitely myths, but are they sufficiently connected to PEP 8?

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


Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Dan Sommers
On Sat, 16 Apr 2016 16:44:30 -0400, Random832 wrote:

> On Sat, Apr 16, 2016, at 16:21, Ben Finney wrote:
>> * Oh, come on, no-one would use U+000C FORM FEED in source code.
> 
> Some text editors have shortcuts to navigate to the previous/next line
> that begins with a form feed.

Add these to the list of myths:

* All producers use the same tools to produce code.
* All consumers use the same tools to consume code.
* All entities that produce and consume code use the same tools.
* All entities use the same tools to consume code that they do to produce it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fraud

2016-04-16 Thread Chris Angelico
On Sun, Apr 17, 2016 at 3:12 AM, Mel Drosis via Python-list
 wrote:
>
> My phone my accounts my home network have all been affected because of 
> someone using coding from Python and Linux and GitHub and json. I don't even 
> know what this stuff is but how do I get rid of it all. It's ruined my life.
>

You don't need Python help after an attack like this any more than you
need an automotive mechanic after you've been run over by a car. What
you need is someone who can help you repair your systems and fix your
security; I suggest looking locally in your area for a computer
expert.

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


[issue26751] Possible bug in sorting algorithm

2016-04-16 Thread Benjamin Peterson

Changes by Benjamin Peterson :


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

___
Python tracker 

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



[issue26571] turtle regression in 3.5

2016-04-16 Thread Ellison Marks

Ellison Marks added the comment:

Just as an update, I've been working around this by manually setting 
TurtleScreen._RUNNING to True before calling Turtle() again, which produces the 
desired behaviour in both 3.4 and 3.5. Haven't noticed any bad effects so far.

--

___
Python tracker 

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



Fraud

2016-04-16 Thread Mel Drosis via Python-list

My phone my accounts my home network have all been affected because of someone 
using coding from Python and Linux and GitHub and json. I don't even know what 
this stuff is but how do I get rid of it all. It's ruined my life. 
Sent from my iPhone
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26780] Illustrate both binary operator conventions in PEP-8

2016-04-16 Thread Guido van Rossum

Guido van Rossum added the comment:

Patch LGTM.

Note that the and/or example was in the PEP before this discussion broke out.

The discussion also at some point (before your Knuth quote was discovered) 
veered in the direction of making and/or a special case, perhaps because it's 
more likely that a long expression must be broken around and/or operators. And 
there were already examples of breaking after binary arithmetic operators 
elsewhere in the PEP (I think).

--

___
Python tracker 

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



Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Random832
On Sat, Apr 16, 2016, at 16:21, Ben Finney wrote:
> * Oh, come on, no-one would use U+000C FORM FEED in source code.

Some text editors have shortcuts to navigate to the previous/next line
that begins with a form feed.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to parameterize unittests

2016-04-16 Thread Antoon Pardon
Op 15-04-16 om 18:47 schreef Steven D'Aprano:
> On Fri, 15 Apr 2016 10:48 pm, Antoon Pardon wrote:
> 
>> Starting from this:
>>
>> class Test_AVLTree(unittest.TestCase):
>>  
>> def test_empty_tree_is_false(self):
>> instance = avltree()
>> self.assertFalse(instance)
>>
>> Changing it into this:
>>
>> def MakeAVLTest(avltree):
>> class Test_AVLTree(unittest.TestCase):
>>
>> def test_empty_tree_is_false(self):
>> instance = avltree()
>> self.assertFalse(instance)
>>
>> return Test_AVLTree
>>
>> AVLTest = MakeAVLTest(avltree)
>> MyTreeTest = MakeAVLTest(mytree)
>>
>> Seems to work
> 
> Right up to the moment that you realise that you need different tests for a
> subclass, and now you can't using subclassing because they aren't
> subclasses, they're completely independent classes that happen to duplicate
> the same methods.
> 
> If the tests for your AVL tree and it's subclasses are *identical*, then
> what's the point of the subclasses?

The subclass has a key-function as a static method similar to the key argument
for sort. This way I can have a tree with strings as keys, but with the
keys sorted according to the locale with the locale.strxfrm function.

This means the only tests that need changing are the tests that test for
iterators to deliver the items in sorted order. But that can be done
by letting the test check for the presence of the keyfunction and in
that case, use if to check if things are in order.

-- 
Antoon

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


[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2016-04-16 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> patch review
type: behavior -> enhancement
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Chris Angelico
On Sun, Apr 17, 2016 at 6:21 AM, Ben Finney  wrote:
> Great suggestion. (Do you have a blog on which you could post an article
> like this?)

I do. I'll let people contribute for a while, and then I'll post it on
rosuav.blogspot.com.

Thanks for the additions!

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


[issue25642] Setting maxsize breaks asyncio.JoinableQueue/Queue

2016-04-16 Thread Berker Peksag

Changes by Berker Peksag :


--
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



Re: sys.exit(1) vs raise SystemExit vs raise

2016-04-16 Thread Ben Finney
Dennis Lee Bieber  writes:

> On Sat, 16 Apr 2016 16:56:10 +1000, Ben Finney 
> declaimed the following:
>
> >It seems strange that even the constant for “no error” exit status
> >should be defined only for Unix :-/
>
>   VMS had a whole slew of "no error" status values

That's fine; those values can be defined per operating system, and
maybe they should be.

My concern is that (according to the documentation) the “no error” exit
status *isn't even defined* on non-Unix operating systems, as though
no other OS uses it.

-- 
 \ “Do unto others twenty-five percent better than you expect them |
  `\  to do unto you. (The twenty-five percent is [to correct] for |
_o__)error.)” —Linus Pauling's Golden Rule |
Ben Finney

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


[issue7694] DeprecationWarnings in distutils are pointless

2016-04-16 Thread Berker Peksag

Berker Peksag added the comment:

> [...] I think the DeprecationWarnings in distutils should just be removed, as 
> they serve no useful purpose.

There are no DeprecationWarning warnings (only four PendingDeprecationWarning 
warnings -- two of them are for 'check_metadata') in distutils codebase in both 
2.7 and 3.x anymore.

Closing this as out of date.

--
nosy: +berker.peksag
resolution:  -> out of date
stage: needs patch -> 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



Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated)

2016-04-16 Thread Ben Finney
Chris Angelico  writes:

> Maybe we need a blog post "Falsehoods Programmers Believe About PEP
> 8", along the lines of the ones about time and names.

Great suggestion. (Do you have a blog on which you could post an article
like this?)

> Remember, every one of these is false.
>
> * All Python code should follow PEP 8.
>
> * If you use a tool named pep8, your code will be PEP 8 compliant.
>
> * If your code is PEP 8 compliant, a tool named pep8 will accept it.
>
> * The Python Standard Library is PEP 8 compliant.
>
> * Okay, at least the new parts of the standard library are PEP 8
>   compliant.
>
> * PEP 8 compliant code is inherently better than non-compliant code.
>
> * PEP8-ing existing code will improve it.
>
> * Once code is PEP 8 compliant, it can easily be kept that way through
>   subsequent edits.
>
> * PEP 8 never changes.
>
> * Well, it never materially changes.
>
> * I mean, new advice, sure, but it'll never actually go back on a
>   rule.

* The line length limit is obsolete in an age of high-resolution
  displays.

* Okay, but if you disregard side-by-side windows, lines of code can be
  arbitrarily long without hurting readability.

* Well, maybe not several hundred characters, but surely 120 characters
  of code on a line is easy enough to read.

* The only valid white space is line breaks and U+0020 SPACE.

* Okay, U+0009 TAB when lining up columns, but no other white space.

* Oh, come on, no-one would use U+000C FORM FEED in source code.

-- 
 \   “The apparent lesson of the Inquisition is that insistence on |
  `\ uniformity of belief is fatal to intellectual, moral, and |
_o__)spiritual health.” —_The Uses Of The Past_, Herbert J. Muller |
Ben Finney

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


[issue24173] curses HOWTO/implementation disagreement

2016-04-16 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report! 3.x docs have already been updated.

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue24173] curses HOWTO/implementation disagreement

2016-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c9cda2bdfd2 by Berker Peksag in branch '2.7':
Issue #24173: Fix curses.wrapper link in curses HOWTO
https://hg.python.org/cpython/rev/5c9cda2bdfd2

--
nosy: +python-dev

___
Python tracker 

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



Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Ben Finney
Larry Martell  writes:

> if we still had 1970's 80 character TTYs that would matter but on my
> 29" 1920x1080 screen it doesn't.

Larry, you've been around long enough to know that's not an argument
against a limited line length for code. It is not about the technology
of your terminal. It's about the technology of the brain reading the
text.

-- 
 \“Fascism is capitalism plus murder.” —Upton Sinclair |
  `\   |
_o__)  |
Ben Finney

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


[issue15933] flaky test in test_datetime

2016-04-16 Thread Berker Peksag

Berker Peksag added the comment:

The assert was changed (somewhat similar to issue15933.diff) in bc67e8d39164. 
I've checked last 18 builds (from 800 to 818) on 
http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.5 and test_today 
wasn't one of the failed tests. I'm closing this as outdated.

--
nosy: +berker.peksag
resolution:  -> out of date
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



[issue26785] repr of -nan value should contain the sign

2016-04-16 Thread Hrvoje Abraham

Hrvoje Abraham added the comment:

Reported issue was created in 64-bit Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 
2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32.

Now I noticed that in Py 2.7 even copysign part does not work as expected.

Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit 
(AMD64)] on win32:

>>> from math import copysign
>>> x = float("-nan")
>>> copysign(1.0, x)
1.0

Not correct.

--

___
Python tracker 

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



Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread alex wright
We employ a pretty hard limit of 100.  This way I can reliably have 1
module split vertically with a test or configuration file open or 3
separate modules, etc.  I find 80 to be a bit strict, although in the past
I've been in unfortunate environments where it was helpful.  The rest of
PEP8 is largely adhered to wherever possible and it's been wonderful.  When
I first came to the project it had no real standard and was mostly
formatted at the whims of the one dev working on it.  It was a mess.  The
team has grown significantly internationally and a codified standard not
rooted in any of our habits is great.

(I've never replied to this list so I hope I don't goof up.)

On Sat, Apr 16, 2016 at 2:18 PM, BartC  wrote:

> On 16/04/2016 17:58, Larry Martell wrote:
>
>> On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa 
>> wrote:
>>
>>> Larry Martell :
>>>
>>> I have worked for many companies where you are required to get a clean
 run of pep8 on your code before your pull request will even be
 considered for approval. I don't agree with this at all, as I think it
 makes the code very ugly, especially enforcing the max line length.

>>>
>>> Agh, I was with you until your last remark.
>>>
>>> A max line length of 79 characters is among the *only* rigorous
>>> principles I judge coding style on.
>>>
>>> It comes with the maxim that one function must be visible at once on the
>>> screen.
>>>
>>
>> if we still had 1970's 80 character TTYs that would matter but on my
>> 29" 1920x1080 screen it doesn't.
>>
>
> There are reasons why 'broadsheet' newspapers don't have a single wide
> column spanning the entire width of the page, but are divided into multiple
> columns.
>
> (But I think 80 columns is a bit limited. Maybe 100 or 132.)
>
> --
> Bartc
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
"On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the
machine wrong figures, will the right answers come out?' I am not able
rightly
to apprehend the kind of confusion of ideas that could provoke such a
question."

-Charles Babbage, 19th century English mathematician, philosopher, inventor
and mechanical engineer who originated the concept of a programmable
computer.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue13340] list.index does not accept None as start or stop

2016-04-16 Thread Berker Peksag

Berker Peksag added the comment:

See http://thread.gmane.org/gmane.comp.python.devel/127502 for the python-dev 
thread.

--
nosy: +berker.peksag
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue25989] documentation version switcher is broken fro 2.6, 3.2, 3.3

2016-04-16 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, but as I said in the GitHub issue, the version switcher 
works as expected (we don't build docs of security-only-fix branches).

--
nosy: +berker.peksag
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



[issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class

2016-04-16 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I believe the correct behavior is actually

Traceback (most recent call last):
  File "", line 1, in 
  File "bar.py", line 7, in 
C()
TypeError: foo.A.__new__(C) is not safe, use foo.B.__new__()

This is because A comes before B in the mro, and, indeed, constructing C with 
A.__new__ is unsafe. In fact, reordering A and B in the definition of C fixes 
everything.

--

___
Python tracker 

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



[issue26781] os.walk max_depth

2016-04-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

os.walk() allows more flexible control.

for root, dirs, files in os.walk(top):
if is_too_deep(root):
dirs.clear()
continue
...

You can even walk up to different depth on different parts of the tree. You can 
limit walking not by the directory depth, but by the length of the path, or the 
number of links in the path, or what-you-need. Adding separate parameters for 
all this particular cases is not practical.

I think there is a little need in this feature.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23029] test_warnings produces extra output in quiet mode

2016-04-16 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
resolution:  -> fixed
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



[issue23029] test_warnings produces extra output in quiet mode

2016-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 009e36e6d16d by Berker Peksag in branch '2.7':
Issue #23029: Fix catch_warnings() in test_filename_none
https://hg.python.org/cpython/rev/009e36e6d16d

--
nosy: +python-dev

___
Python tracker 

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



Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Ethan Furman

On 04/16/2016 10:25 AM, Terry Reedy wrote:

On 4/16/2016 12:58 PM, Larry Martell wrote:

On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa wrote:



Larry Martell wrote:



I have worked for many companies where you are required to get a clean
run of pep8 on your code before your pull request will even be
considered for approval. I don't agree with this at all, as I think it
makes the code very ugly, especially enforcing the max line length.


Agh, I was with you until your last remark.

A max line length of 79 characters is among the *only* rigorous
principles I judge coding style on.

It comes with the maxim that one function must be visible at once on the
screen.


if we still had 1970's 80 character TTYs that would matter but on my
29" 1920x1080 screen it doesn't.


It depends on whether one prefers to use the extra width to have long
lines or side-by-side windows.  I prefer the latter.


Python code windows go in my portrait mode 27" screens (120 chars), 
while xml windows go in landscape mode (220 chars).


Yes, there are many reasons why I don't like xml. :(

--
~Ethan~

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


Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Larry Martell
On Sat, Apr 16, 2016 at 2:18 PM, BartC  wrote:
> On 16/04/2016 17:58, Larry Martell wrote:
>>
>> On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa  wrote:
>>>
>>> Larry Martell :
>>>
 I have worked for many companies where you are required to get a clean
 run of pep8 on your code before your pull request will even be
 considered for approval. I don't agree with this at all, as I think it
 makes the code very ugly, especially enforcing the max line length.
>>>
>>>
>>> Agh, I was with you until your last remark.
>>>
>>> A max line length of 79 characters is among the *only* rigorous
>>> principles I judge coding style on.
>>>
>>> It comes with the maxim that one function must be visible at once on the
>>> screen.
>>
>>
>> if we still had 1970's 80 character TTYs that would matter but on my
>> 29" 1920x1080 screen it doesn't.
>
>
> There are reasons why 'broadsheet' newspapers don't have a single wide
> column spanning the entire width of the page, but are divided into multiple
> columns.

Nor do they have a \ at the end of each line with the following line indented.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26785] repr of -nan value should contain the sign

2016-04-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue26784] regular expression problem at umlaut handling

2016-04-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Because "[\s\w]*" matches only a part of "Bläh": "Bl\xc3".

--

___
Python tracker 

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



[issue26785] repr of -nan value should contain the sign

2016-04-16 Thread Hrvoje Abraham

New submission from Hrvoje Abraham:

repr of -nan value should contain the sign so the round-trip could be assured. 
NaN value sign (bit) could be seen as not relevant or even uninterpretable 
information, but it is actually used in real-life situations, the fact 
substantiated by section 6.3 of IEEE-754 2008 standard.

>>> from math import copysign
>>> x = float("-nan")
>>> copysign(1.0, x)
-1.0

This is correct. Also proves the value contains the sign information.

>>> repr(x)
nan

Not correct. Should be '-nan'.

--
components: Interpreter Core
messages: 263576
nosy: ahrvoje
priority: normal
severity: normal
status: open
title: repr of -nan value should contain the sign
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Marko Rauhamaa
Terry Reedy :

> On 4/16/2016 12:58 PM, Larry Martell wrote:
>> if we still had 1970's 80 character TTYs that would matter but on my
>> 29" 1920x1080 screen it doesn't.
>
> It depends on whether one prefers to use the extra width to have long
> lines or side-by-side windows.  I prefer the latter.

Precisely. I have better uses for my screen than seeing a mostly white,
ragged right margin.


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


[issue26784] regular expression problem at umlaut handling

2016-04-16 Thread Marcus

Marcus added the comment:

When I replace the first "ä" with a random letter the untouched expression has 
not problems to match the second word which contains also an "ä"

s = "E-112233-555-11 | Bläh - Bläh" #untuched string
s = "E-112233-555-11 | Bloh - Bläh" #string where the first ä is replaced by an 
"o"

--

___
Python tracker 

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



[issue26781] os.walk max_depth

2016-04-16 Thread Aviv Palivoda

Changes by Aviv Palivoda :


Added file: http://bugs.python.org/file42494/os-walk-max-depth-2.patch

___
Python tracker 

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



[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-04-16 Thread Berker Peksag

Berker Peksag added the comment:

Agreed. Let's close this then.

--
nosy: +berker.peksag
resolution:  -> rejected
stage: needs patch -> 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: Guido sees the light: PEP 8 updated

2016-04-16 Thread BartC

On 16/04/2016 17:58, Larry Martell wrote:

On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa  wrote:

Larry Martell :


I have worked for many companies where you are required to get a clean
run of pep8 on your code before your pull request will even be
considered for approval. I don't agree with this at all, as I think it
makes the code very ugly, especially enforcing the max line length.


Agh, I was with you until your last remark.

A max line length of 79 characters is among the *only* rigorous
principles I judge coding style on.

It comes with the maxim that one function must be visible at once on the
screen.


if we still had 1970's 80 character TTYs that would matter but on my
29" 1920x1080 screen it doesn't.


There are reasons why 'broadsheet' newspapers don't have a single wide 
column spanning the entire width of the page, but are divided into 
multiple columns.


(But I think 80 columns is a bit limited. Maybe 100 or 132.)

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


[issue26780] Illustrate both binary operator conventions in PEP-8

2016-04-16 Thread Brandon Rhodes

Changes by Brandon Rhodes :


--
type:  -> enhancement

___
Python tracker 

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



[issue26780] Illustrate both binary operator conventions in PEP-8

2016-04-16 Thread Brandon Rhodes

Brandon Rhodes added the comment:

Another important objection against the current text is that it stacks a series 
of `and` and `or` operators at the same level of indentation, as though they 
naturally evaluate in the order the programmer writes them. In fact, they have 
different levels of precedence, and the code example violates the other 
sections of PEP-8 that ask for the creation of a visual distinction in code 
between different precedence levels.

The example needs to pivot towards a series of operators which belong at the 
same precedence level. I have used `+` and `-` because they seemed more natural 
to form an example from than something like division and multiplication.

--

___
Python tracker 

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



[issue26784] regular expression problem at umlaut handling

2016-04-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, I don't understand you. If the regex failed to match the first "ä", it 
can't match the second "ä". Do you have an example?

--

___
Python tracker 

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



[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-04-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think there is a little need for this feature. On other hand, its use looks 
complicated, and it will likely complicate the implementation.

If tested types are same, but messages differ, messages can be combined in on 
regex: 'msg1|msg2'.

If tested types differ, but messages are same, this case is already supported.

If tested types and messages differ, you can test with combined regex, and then 
check a context manager object that the message matches the type. But this is 
very rare case.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26784] regular expression problem at umlaut handling

2016-04-16 Thread Marcus

Marcus added the comment:

Thx for your explanation. You explained why [\s\w] didn't match for "ä". In my 
situation it didn't matches for the first "ä" but the second time I used [\s\w] 
in the same regex it matched at the second "ä". What's the explanation for this?

--

___
Python tracker 

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



[issue26784] regular expression problem at umlaut handling

2016-04-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

First, in the context of Python a crash means a core dump or an analogue on 
Windows. In this case the code just works not as you expected.

The short answer: s should be a unicode.

In your code "ä" is encoded as 8-bit string '\xc3\xa4'. When matched, every 
bytes is independently expanded to Unicode range. The first byte becomes 
u'\xc3' = u'Ã', the second byte becomes u'¤', non-alphanumeric. '[\s\w]*' 
doesn't match u'ä'.

"ü" is encoded as 8-bit string '\xc3\xbc'. The second byte becomes u'¼', 
numeric. '[\s\w]*' matches u'ü'.

--
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



[issue21274] define PATH_MAX for GNU/Hurd in Python/pythonrun.c

2016-04-16 Thread Berker Peksag

Berker Peksag added the comment:

Python 3.4 is in security-fix-only mode so we can close this now.

--
nosy: +berker.peksag
resolution:  -> fixed
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



Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Terry Reedy

On 4/16/2016 12:58 PM, Larry Martell wrote:

On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa  wrote:

Larry Martell :


I have worked for many companies where you are required to get a clean
run of pep8 on your code before your pull request will even be
considered for approval. I don't agree with this at all, as I think it
makes the code very ugly, especially enforcing the max line length.


Agh, I was with you until your last remark.

A max line length of 79 characters is among the *only* rigorous
principles I judge coding style on.

It comes with the maxim that one function must be visible at once on the
screen.


if we still had 1970's 80 character TTYs that would matter but on my
29" 1920x1080 screen it doesn't.


It depends on whether one prefers to use the extra width to have long 
lines or side-by-side windows.  I prefer the latter.


--
Terry Jan Reedy

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


Re: Dynamic inputs

2016-04-16 Thread Terry Reedy

On 4/16/2016 3:35 AM, durgadevi1 wrote:


what does dynamic inputs mean and how is it implemented in python programming?


'dynamic input' is new to me.  I would take it to mean input that is not 
available until the program is running.  Inputs from people and sensors 
would qualify.  But maybe whoever you read it from meant 'strong, 
energizing' as opposed to 'weak, inervating'.


--
Terry Jan Reedy

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


[issue20739] PEP 463 (except expression) implementation

2016-04-16 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> rejected
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



[issue26784] regular expression problem at umlaut handling

2016-04-16 Thread SilentGhost

Changes by SilentGhost :


--
components: +Regular Expressions
nosy: +ezio.melotti, mrabarnett, pitrou, serhiy.storchaka

___
Python tracker 

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



Re: Guido sees the light: PEP 8 updated

2016-04-16 Thread Larry Martell
On Sat, Apr 16, 2016 at 12:51 PM, Marko Rauhamaa  wrote:
> Larry Martell :
>
>> I have worked for many companies where you are required to get a clean
>> run of pep8 on your code before your pull request will even be
>> considered for approval. I don't agree with this at all, as I think it
>> makes the code very ugly, especially enforcing the max line length.
>
> Agh, I was with you until your last remark.
>
> A max line length of 79 characters is among the *only* rigorous
> principles I judge coding style on.
>
> It comes with the maxim that one function must be visible at once on the
> screen.

if we still had 1970's 80 character TTYs that would matter but on my
29" 1920x1080 screen it doesn't.
-- 
https://mail.python.org/mailman/listinfo/python-list


  1   2   >