Re: [OT] absolute vs. relative URI

2015-01-23 Thread Grant Edwards
On 2015-01-23, Chris Warrick kwpol...@gmail.com wrote: Hah! Those people certainly don’t look “experienced”. a src='%sWhateverWhatever/a % wwwroot 0. This should be href=, but this is probably an error with retyping. (use copy-paste next time.) 1. double quotes should be used, 2. and

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 4:22 AM, Rustom Mody rustompm...@gmail.com wrote: Strikes me that making enumerations is-equal rather than just =-equal is a bit heavy-handed and unnecessary What do you think? *Normal* use of an enumeration does make sense for them to be identical. Classic use would be

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Rustom Mody
On Friday, January 23, 2015 at 11:07:48 PM UTC+5:30, Chris Angelico wrote: On Sat, Jan 24, 2015 at 4:22 AM, Rustom Mody wrote: Strikes me that making enumerations is-equal rather than just =-equal is a bit heavy-handed and unnecessary What do you think? *Normal* use of an enumeration

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Rustom Mody
On Friday, January 23, 2015 at 10:22:06 PM UTC+5:30, Ian wrote: On Fri, Jan 23, 2015 at 8:31 AM, Rustom Mody wrote: Can you tell me what of the following code does not satisfy your requirements? [Needs python 3.4] from enum import IntEnum class B4(IntEnum): F1 = 0

Re: Case-insensitive sorting of strings (Python newbie)

2015-01-23 Thread Peter Otten
John Sampson wrote: I notice that the string method 'lower' seems to convert some strings (input from a text file) to Unicode but not others. This messes up sorting if it is used on arguments of 'sorted' since Unicode strings come before ordinary ones. Is there a better way of

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Ian Kelly
On Fri, Jan 23, 2015 at 10:03 AM, Rustom Mody rustompm...@gmail.com wrote: On Friday, January 23, 2015 at 10:22:06 PM UTC+5:30, Ian wrote: On Fri, Jan 23, 2015 at 8:31 AM, Rustom Mody wrote: Can you tell me what of the following code does not satisfy your requirements? [Needs python 3.4]

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Ian Kelly
On Fri, Jan 23, 2015 at 10:45 AM, Rustom Mody rustompm...@gmail.com wrote: No disagreement with the 'hack' As for no use case for equal but distinct tokens - thats a strange view given this thread If you want equal but distinct, you can give them distinct values and define an __eq__ method

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Ent
Ent added the comment: @demian: That's a tall order! :) I would love to use HTTPStatus but for some reason http/__init__.py is devoid of code related to it - https://hg.python.org/cpython/file/31982d70a52a/Lib/http/__init__.py I wasn't sure why this change was made because it like feels a

[issue23223] subprocess32 unable to be installed via pip

2015-01-23 Thread Marat Mavlyutov
Marat Mavlyutov added the comment: HI! need that thingie too, did you poke the author? cant find issue tracker at code.google.com -- nosy: +Marat.Mavlyutov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23223

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Ian Kelly
On Fri, Jan 23, 2015 at 8:31 AM, Rustom Mody rustompm...@gmail.com wrote: Can you tell me what of the following code does not satisfy your requirements? [Needs python 3.4] from enum import IntEnum class B4(IntEnum): F1 = 0 F2 = 0 F3 = 0 T = 1 This

Re: [OT] absolute vs. relative URI

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 3:00 AM, Chris Warrick kwpol...@gmail.com wrote: 5. especially old-style %-based string formatting! Please. There's nothing wrong with %-style formatting. It's not deprecated, and never will be; and it has the advantage of being cross-language compatible. I was speaking

Re: [OT] absolute vs. relative URI

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 1:47 AM, Grant Edwards invalid@invalid.invalid wrote: I'm maintaining a web app were the original author(s) went to a little bit of trouble to always use absolute URIs in links in the pages. The advantage is that someone who downloads the bare page will still be

Re: Case-insensitive sorting of strings (Python newbie)

2015-01-23 Thread Steven D'Aprano
John Sampson wrote: I notice that the string method 'lower' seems to convert some strings (input from a text file) to Unicode but not others. I don't think so. You're going to have to show an example. I *think* what you might be running into is an artifact of printing to a terminal, which may

[issue23300] httplib is using a method that doesn't exist

2015-01-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: Addressed Berker's review comments. 1) Made the TestServer a Mixin. (Thanks, that's the correct to do). 2) Changed Post to Port. 3) I went with still using a testdomain and port in the constructor. My idea of the test is to demonstrate that the

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 12:23 AM, Fetchinson . fetchin...@googlemail.com wrote: In any case, I'm pretty sure it was said before, but I can't really find it anywhere, can someone tell me what the rationale is for *function signature* type hinting? I totally get type hinting in general, but why

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Berker Peksag
Berker Peksag added the comment: I would love to use HTTPStatus but for some reason http/__init__.py is devoid of code related to it - https://hg.python.org/cpython/file/31982d70a52a/Lib/http/__init__.py See the default branch:

[issue23152] fstat64 required on Windows

2015-01-23 Thread Steve Dower
Steve Dower added the comment: Yeah, that's the sole buildbot currently running VS 2015. I'm expecting to have more after VS 2015 RC is released, since that will be basically finished. Until then, I'm also regularly building with the latest internal versions and tracking issues, but nothing

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Ian Kelly
On Fri, Jan 23, 2015 at 4:46 AM, Andrew Robinson andr...@r3dsolutions.com wrote: Although, I have to laugh -- Verilog can syntheze a CPU -- implement memory -- and then load a program and run python on the virtual machine. When the pentium was first developed, I watched as Intel actually

Case-insensitive sorting of strings (Python newbie)

2015-01-23 Thread John Sampson
I notice that the string method 'lower' seems to convert some strings (input from a text file) to Unicode but not others. This messes up sorting if it is used on arguments of 'sorted' since Unicode strings come before ordinary ones. Is there a better way of case-insensitive sorting of strings

Re: Check for running DHCP daemon?

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 3:02 AM, Jason Bailey jbai...@emerytelcom.com wrote: I'm actually wondering if it might be more beneficial for me to check if the local DHCP port (udp 67) is bound and in use. I had tried to do this some time ago, and couldn't get it working right (it would always test

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 4:03 AM, Rustom Mody rustompm...@gmail.com wrote: The only workaround I have been able to come up with is: class B4(IntEnum): F1 = 0 F2 = F3 = None T = 1 which is not bad; its ridiculous It's ridiculous because you declared an

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the work! I'm not sure why the last patch doesn't appear on Rietveld, so (unfortunately) here's the result of my review. I've only covered functional aspects in this run at it: +base_files = ['index.html', 'index.htm'] Can you use index_files?

[issue1681974] mkdtemp fails on Windows if username has non-ASCII character

2015-01-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: Ubik: this issue is closed, as we believe that it does not exist anymore. If you still think there is a bug surrounding mkdtemp, please make a new full bug report. Structure your report as follows: 1. this is what you did 2. this is what happened 3. this is

Re: Case-insensitive sorting of strings (Python newbie)

2015-01-23 Thread Michael Ströder
John Sampson wrote: I notice that the string method 'lower' seems to convert some strings (input from a text file) to Unicode but not others. This messes up sorting if it is used on arguments of 'sorted' since Unicode strings come before ordinary ones. I doubt that. Can you provide a short

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Rustom Mody
On Friday, January 23, 2015 at 10:22:06 PM UTC+5:30, Ian wrote: On Fri, Jan 23, 2015 at 8:31 AM, Rustom Mody wrote: Can you tell me what of the following code does not satisfy your requirements? [Needs python 3.4] from enum import IntEnum class B4(IntEnum): F1 = 0

Re: Case-insensitive sorting of strings (Python newbie)

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 4:53 AM, Peter Otten __pete...@web.de wrote: Now the same with unicode. To read text with a specific encoding use either codecs.open() or io.open() instead of the built-in (replace utf-8 with your actual encoding): import io for line in io.open(tmp.txt,

Re: kivy secret of mana game

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 5:09 AM, Tony the Tiger tony@tiger.invalid wrote: On Thu, 22 Jan 2015 17:13:12 +, Automn wrote: game No interest, at all, nada, zilch. zero, nothing. /Grrr Then don't bother responding, just skip the thread and move on. The rest of us, who don't have this

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Rustom Mody
On Friday, January 23, 2015 at 10:54:06 PM UTC+5:30, Chris Angelico wrote: On Sat, Jan 24, 2015 at 4:03 AM, Rustom Mody wrote: The only workaround I have been able to come up with is: class B4(IntEnum): F1 = 0 F2 = F3 = None T = 1 which is not

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Ent
Ent added the comment: @demian: If you don't mind, could you please elaborate a bit more on `_resolve_path()` you mentioned in the review/comment? Or maybe link me to the type of behaviour you mentioned? I will accordingly make the changes. As for self.apply_headers, I will see if I can make

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 4:45 AM, Rustom Mody rustompm...@gmail.com wrote: No disagreement with the 'hack' As for no use case for equal but distinct tokens - thats a strange view given this thread Look at it this way: A classic enumeration has no use-case for equal-but-distinct; this thread

[issue23300] httplib is using a method that doesn't exist

2015-01-23 Thread Berker Peksag
Berker Peksag added the comment: LGTM. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___ ___

[issue23207] logging.basicConfig does not validate keyword arguments

2015-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2bc3e839a3a3 by Vinay Sajip in branch '3.4': Issue #23207: logging.basicConfig() now does additional validation of its arguments. https://hg.python.org/cpython/rev/2bc3e839a3a3 New changeset 06ba5e776a6e by Vinay Sajip in branch 'default': Closes

Re: Loading a module from a subdirectory

2015-01-23 Thread Automn
On 2014-03-10, Virgil Stokes v...@it.uu.se wrote: This is a multi-part message in MIME format. --030903060901020503030004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I have the following folder-file structure:

[issue23305] RotatingFileHandler does not rotate if backupCount is 0

2015-01-23 Thread Juha Lemmetti
Juha Lemmetti added the comment: What You point out is true. However, I saw a bug in code where RotatingFileHandler was used, and I had to check the operation using a small test program. For maxBytes, it is explicitly stated that when the value is 0, rollover never occurs. It wouldn't hurt

[issue20188] ALPN support for TLS

2015-01-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Fri, Jan 23, 2015, at 15:36, Antoine Pitrou wrote: Antoine Pitrou added the comment: Well, sure, but that means you plan to make it available in 3.4.3? Why is that? No, I'll apply it to 3.5. -- ___

Re: kivy secret of mana game

2015-01-23 Thread Ethan Furman
On 01/22/2015 09:13 AM, Automn wrote: I am programming a Secret of Mana (Seiken Densetsu) game in kivy, it runs on a phone with kivy launcher. AWESOME That was a totally fabulous game -- one of the very few I actually played to the end. :) -- ~Ethan~ signature.asc Description:

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Rick Johnson
On Thursday, January 22, 2015 at 9:22:40 PM UTC-6, Terry Reedy wrote: On 1/22/2015 8:15 PM, Rick Johnson wrote: Okay, i have found a solution to the type hinting problem that will appease both sides. On one side we have those who are proposing type hinting annotations within function

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Rick Johnson
On Thursday, January 22, 2015 at 9:24:01 PM UTC-6, Rustom Mody wrote: Simplistic Example Code utilizing two files: [...snip code example...] 1. Allow

Re: [OT] absolute vs. relative URI

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 6:02 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: It's not deprecated, and never will be; Chris, what do you call a statement that is based on an un-provable premise? Oh and, GvR told me to tell you that he wants his time machine back, and if it has even one

Re: Random ALL CAPS posts on this group

2015-01-23 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Ben Finney wrote: Freedom of expression entails an obligation on the state to not quash anyone's expression. It does not affect anyone who is not the state; it imposes no obligation on the PSF. By this reasoning, you would be

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Demian Brecht
Demian Brecht added the comment: @demian: If you don't mind, could you please elaborate a bit more on `_resolve_path()` you mentioned in the review/comment? Sure. In your patch, you have redirect_browser (or redirect if you renamed it), which sounds like it's allowing for a very generic

Re: Loading a module from a subdirectory

2015-01-23 Thread Ian Kelly
On Fri, Jan 23, 2015 at 11:23 AM, Automn aut...@willow.org wrote: On 2014-03-10, Virgil Stokes v...@it.uu.se wrote: [SNIP] I don't think you understand what Mr. Otten said, it is not undefined behaviour, maybe you could demangle your import statement. The post you're replying to is 10

Re: Case-insensitive sorting of strings (Python newbie)

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 6:14 AM, Marko Rauhamaa ma...@pacujo.net wrote: Well, if Python can't, then who can? Probably nobody in the world, not generically, anyway. Example: print(re\u0301sume\u0301) résumé print(r\u00e9sum\u00e9) résumé print(re\u0301sume\u0301 ==

[issue20188] ALPN support for TLS

2015-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why is that 3.4.3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list

[issue20188] ALPN support for TLS

2015-01-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here you are. -- keywords: +patch nosy: +benjamin.peterson stage: needs patch - patch review Added file: http://bugs.python.org/file37829/alpn.patch ___ Python tracker rep...@bugs.python.org

[issue20188] ALPN support for TLS

2015-01-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here's the fixed 3.5 patch. -- Added file: http://bugs.python.org/file37830/alpn.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Rick Johnson
On Friday, January 23, 2015 at 7:23:34 AM UTC-6, Fetchinson . wrote: I really like the idea that in python I don't have lots of choices in many areas, certain things are dictated. The big advantage is that when I read other people's code I know what to expect so me being restricted is a small

Re: Random ALL CAPS posts on this group

2015-01-23 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Ben Finney wrote: Freedom of expression entails an obligation on the state to not quash anyone's expression. It does not affect anyone who is not the state; it imposes no obligation on the PSF. By this reasoning, you would be

[issue20188] ALPN support for TLS

2015-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, sure, but that means you plan to make it available in 3.4.3? Why is that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___

Re: kivy secret of mana game

2015-01-23 Thread sohcahtoa82
On Friday, January 23, 2015 at 10:10:08 AM UTC-8, Tony the Tiger wrote: On Thu, 22 Jan 2015 17:13:12 +, Automn wrote: game No interest, at all, nada, zilch. zero, nothing. /Grrr Why don't you like fun? -- https://mail.python.org/mailman/listinfo/python-list

[issue23202] pyvenv does not fail like documented when a venv already exists

2015-01-23 Thread Vinay Sajip
Vinay Sajip added the comment: The behaviour was changed in 3.4 in response to #15776, but the documentation wasn't updated to match. I will update the docs to remove the reference to the error. -- ___ Python tracker rep...@bugs.python.org

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 6:48 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: On Thursday, January 22, 2015 at 10:04:29 PM UTC-6, Chris Angelico wrote: It's worth pointing out, too, that the idea isn't panaceaic - it's just another tool in the box. Any time you break related things into

[issue23305] RotatingFileHandler does not rotate if backupCount is 0

2015-01-23 Thread Vinay Sajip
Vinay Sajip added the comment: The default parameters for backupCount and maxBytes are both shown as 0. The first paragraph ends with By default, the file grows indefinitely. The second paragraph says, If backupCount is non-zero, the system will save old log files by appending the extensions

Re: [OT] absolute vs. relative URI

2015-01-23 Thread Mark Lawrence
On 23/01/2015 19:46, Chris Angelico wrote: On Sat, Jan 24, 2015 at 6:02 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: It's not deprecated, and never will be; Chris, what do you call a statement that is based on an un-provable premise? Oh and, GvR told me to tell you that he wants his

[issue23223] subprocess32 unable to be installed via pip

2015-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: I can apply this to subprocess32 but it is going to look much more like: +#ifndef MS_WINDOWS /* WTF is anyone compiling on Windows? Shouldn't work! */ +# define HAVE_UNISTD_H 1 +#endif +#ifdef HAVE_UNISTD_H #include unistd.h +#endif The real question is

[issue20188] ALPN support for TLS

2015-01-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Fri, Jan 23, 2015, at 15:33, Antoine Pitrou wrote: Antoine Pitrou added the comment: Why is that 3.4.3? I wrote the patch on the 3.4 branch. -- ___ Python tracker rep...@bugs.python.org

Re: [OT] absolute vs. relative URI

2015-01-23 Thread Rick Johnson
On Friday, January 23, 2015 at 11:49:05 AM UTC-6, Chris Angelico wrote: On Sat, Jan 24, 2015 at 3:00 AM, Chris Warrick wrote: 5. especially old-style %-based string formatting! Please. There's nothing wrong with %-style formatting. *BALD-FACED-PARTISAN-LIE*! If there is *NOTHING* wrong

Re: Case-insensitive sorting of strings (Python newbie)

2015-01-23 Thread Marko Rauhamaa
Peter Otten __pete...@web.de: The standard recommendation is to convert bytes to unicode as early as possible and only manipulate unicode. Unicode doesn't get you off the hook (as you explain later in your post). Upper/lowercase as well as collation order is ambiguous. Python even with decent

[issue23202] pyvenv does not fail like documented when a venv already exists

2015-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset a3a44d871d70 by Vinay Sajip in branch 'default': Closes #23202: pyvenv documentation updated to match its behavior. https://hg.python.org/cpython/rev/a3a44d871d70 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open -

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Rick Johnson
On Thursday, January 22, 2015 at 10:04:29 PM UTC-6, Chris Angelico wrote: It's worth pointing out, too, that the idea isn't panaceaic - it's just another tool in the box. Any time you break related things into separate places, especially separate files, the tendency for them to get out of

[issue23223] subprocess32 unable to be installed via pip

2015-01-23 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- assignee: - gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23223 ___ ___

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Fetchinson .
On 1/23/15, Chris Angelico ros...@gmail.com wrote: On Sat, Jan 24, 2015 at 12:23 AM, Fetchinson . fetchin...@googlemail.com wrote: In any case, I'm pretty sure it was said before, but I can't really find it anywhere, can someone tell me what the rationale is for *function signature* type

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread sohcahtoa82
On Friday, January 23, 2015 at 2:46:01 PM UTC-8, Mario Figueiredo wrote: In article mpg.2f2cecb4624e49c4989...@nntp.aioe.org, mar...@gmail.com says... So I'd rather see: def myfunction(arg1, arg2): Normal docstring. @typehint: (str, int) - bool

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Mario Figueiredo
In article c1d9c448-31b0-4bbc-8c6f-5194678a6...@googlegroups.com, sohcahto...@gmail.com says... def myfunction(arg1, arg2): Normal docstring... @typehint: (str, int) - bool return True I really like that implementation. Its

[issue1060] zipfile cannot handle files larger than 2GB (inside archive)

2015-01-23 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- assignee: gregory.p.smith - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1060 ___ ___

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Rick Johnson
On Friday, January 23, 2015 at 1:59:38 PM UTC-6, Chris Angelico wrote: On Sat, Jan 24, 2015 at 6:48 AM, Sir Rick Johnson wrote: On Thursday, January 22, 2015 at 10:04:29 PM UTC-6, Chris Angelico wrote: It's worth pointing out, too, that the idea isn't panaceaic - it's just another tool in

[issue20188] ALPN support for TLS

2015-01-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: update after review comments -- Added file: http://bugs.python.org/file37831/alpn.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___

[issue20188] ALPN support for TLS

2015-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset be9fe0c66075 by Benjamin Peterson in branch 'default': add support for ALPN (closes #20188) https://hg.python.org/cpython/rev/be9fe0c66075 New changeset 7ce67d3f0908 by Benjamin Peterson in branch '2.7': pep 466 backport of alpn (#20188)

Re: What killed Smalltalk could kill Python

2015-01-23 Thread Tim Daneliuk
On 01/21/2015 05:55 PM, Chris Angelico wrote: On Thu, Jan 22, 2015 at 10:37 AM, Tim Daneliuk tun...@tundraware.com wrote: I find these kinds of discussions sort of silly. Once there is a critical mass of installed base, no language EVER dies. Not sure about that. Back in the 1990s, I wrote

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Rick Johnson
On Friday, January 23, 2015 at 3:13:12 PM UTC-6, Mario Figueiredo wrote: In article 12d74fb6-f7d7-4ff0-88d3-6076a5dc7...@googlegroups.com, Sir Richard Johnson The First says... Injecting polarity into debates is dangerous, because, then we get off into the emotional weeds and a solution

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Mario Figueiredo
In article 4b3b498a-c9b0-443d-8514-87ccd8e98...@googlegroups.com, rantingrickjohn...@gmail.com says... (Example modified for PEP8 compliance ;-) @typehint(arg1:str, arg2:int, returns:bool) def myfunction(arg1, arg2): return True Of course @typehint could

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Mario Figueiredo
In article 5afad59b-5e8c-4821-85cf-9e971c8c7...@googlegroups.com, rantingrickjohn...@gmail.com says... On Thursday, January 22, 2015 at 10:04:29 PM UTC-6, Chris Angelico wrote: It's worth pointing out, too, that the idea isn't panaceaic - it's just another tool in the box. Any time you

Re: Check for running DHCP daemon?

2015-01-23 Thread sohcahtoa82
On Friday, January 23, 2015 at 2:07:04 PM UTC-8, Jason Bailey wrote: Is there a way to do it without calling external utilities (i.e. a Python module, etc)? I'd rather stay within the realm of Python if possible. Jason On 01/23/2015 10:04 AM, Chris Angelico wrote: On Sat, Jan 24,

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Mario Figueiredo
In article mpg.2f2cecb4624e49c4989...@nntp.aioe.org, mar...@gmail.com says... So I'd rather see: def myfunction(arg1, arg2): Normal docstring. @typehint: (str, int) - bool return True Actually that is idiotic. Much better is: def

Re: What killed Smalltalk could kill Python

2015-01-23 Thread sohcahtoa82
On Thursday, January 22, 2015 at 9:39:53 PM UTC-8, alex23 wrote: On 22/01/2015 1:23 PM, Steven D'Aprano wrote: Modern games *are* part of today's complex application systems, and games developers may need the same skills used by serious developers I wish more game developers would

Re: What killed Smalltalk could kill Python

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 9:51 AM, Tim Daneliuk tun...@tundraware.com wrote: On 01/21/2015 05:55 PM, Chris Angelico wrote: On Thu, Jan 22, 2015 at 10:37 AM, Tim Daneliuk tun...@tundraware.com wrote: I find these kinds of discussions sort of silly. Once there is a critical mass of installed

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Rick Johnson
On Friday, January 23, 2015 at 3:02:57 PM UTC-6, Mario Figueiredo wrote: In any case, I agree entirely with you that type annotation is one ugly syntax to a programming language that is touted everywhere as being simple and easy to read. I would say that the mistake started 5 years ago, and

Re: Check for running DHCP daemon?

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 9:38 AM, sohcahto...@gmail.com wrote: Secondly, even if you find a module, keep in mind that the module probably won't stay in Python land. It will probably call an external utility itself. If you REALLY wanted to check it without calling an external utility, you

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Mario Figueiredo
In article 12d74fb6-f7d7-4ff0-88d3-6076a5dc7...@googlegroups.com, rantingrickjohn...@gmail.com says... Injecting polarity into debates is dangerous, because, then we get off into the emotional weeds and a solution may never be found -- just observe the polarization of American politics if

[issue23305] RotatingFileHandler does not rotate if backupCount is 0

2015-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0375eb71d75e by Vinay Sajip in branch '2.7': Issue #23305: clarified RotatingFileHandler documentation. https://hg.python.org/cpython/rev/0375eb71d75e New changeset 93888975606b by Vinay Sajip in branch '3.4': Issue #23305: clarified

[issue20188] ALPN support for TLS

2015-01-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - benjamin.peterson stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___

Re: Check for running DHCP daemon?

2015-01-23 Thread Jason Bailey
Is there a way to do it without calling external utilities (i.e. a Python module, etc)? I'd rather stay within the realm of Python if possible. Jason On 01/23/2015 10:04 AM, Chris Angelico wrote: On Sat, Jan 24, 2015 at 3:02 AM, Jason Bailey jbai...@emerytelcom.com wrote: I'm actually

Re: Random ALL CAPS posts on this group

2015-01-23 Thread sohcahtoa82
On Monday, January 19, 2015 at 4:16:13 PM UTC-8, Luke Tomaneng wrote: Has anyone noticed these? There have been about three of them recently and they don't seem to have anything to do with Python at all. Does anyone know if there is a good reason they are here? My question is, does anyone

Re: What killed Smalltalk could kill Python

2015-01-23 Thread Emile van Sebille
On 1/23/2015 2:48 PM, sohcahto...@gmail.com wrote: On Thursday, January 22, 2015 at 9:39:53 PM UTC-8, alex23 wrote: I seem to recall an interview with someone from Blizzard Entertainment mentioning that the first Warcraft game (Released in 1994) was developed by passing around floppy disks

Re: Check for running DHCP daemon?

2015-01-23 Thread sohcahtoa82
On Friday, January 23, 2015 at 2:50:12 PM UTC-8, Chris Angelico wrote: On Sat, Jan 24, 2015 at 9:38 AM, sohcahto...@gmail.com wrote: Secondly, even if you find a module, keep in mind that the module probably won't stay in Python land. It will probably call an external utility itself.

[issue23282] Slightly faster set lookup

2015-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point Josh. Yes, it may slow down other cases, and there is a difference between sets and dicts. 1. If the key is not contained in the set, then if the first tested entry table[hash mask] is empty, then the lookup is slowed down by one pointer

[issue16648] stdib should use new exception types from PEP 3151

2015-01-23 Thread STINNER Victor
STINNER Victor added the comment: Oh, I didn't know this issue. FYI I modified the subprocess module to use new specialized OSError exceptions: issue #23234 (changeset 0c5ae257966f). -- nosy: +haypo ___ Python tracker rep...@bugs.python.org

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Marko Rauhamaa
Mario Figueiredo mar...@gmail.com: Much better is: def myfunction(arg1, arg2): Normal docstring... @typehint: (str, int) - bool return True I seem to remember an idea floated on the Scheme mailing list of using assertions for such a purpose:

[issue23306] zlib.crc32 raises OverflowError at argument-parsing time on large strings

2015-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: This bug prevents zipfile's writestr() from writing large data (longer than UINT_MAX) to a 64-bit zip file. The zlib.crc32 function which, as written, cannot accept input with a size larger than an unsigned int.

[issue23292] Enum doc suggestion

2015-01-23 Thread Ethan Furman
Ethan Furman added the comment: Currently the way to add an Enum's members to a module's namespace is: globals().update(MyEnumeration.__members__) but that seems quite ugly. Is there anywhere else that the user is required to use __xxx__ methods for common functionality? I think a new

Re: Comparisons and sorting of a numeric class....

2015-01-23 Thread Rustom Mody
On Friday, January 23, 2015 at 11:35:49 PM UTC+5:30, Ian wrote: On Fri, Jan 23, 2015 at 10:03 AM, Rustom Mody wrote: On Friday, January 23, 2015 at 10:22:06 PM UTC+5:30, Ian wrote: On Fri, Jan 23, 2015 at 8:31 AM, Rustom Mody wrote: Can you tell me what of the following code does not

Re: Random ALL CAPS posts on this group

2015-01-23 Thread Rick Johnson
On Friday, January 23, 2015 at 6:05:02 AM UTC-6, Chris Angelico wrote: It's definitely not state vs non-state. Freedom of expression should allow me to say anything I like in my own home I also hereby declare that man should be free to ponder thoughts in his own mind, and sing in his own

Re: multiprocessing.Queue vim python interpreter

2015-01-23 Thread Cameron Simpson
On 18Jan2015 16:20, unknown3...@gmail.com unknown3...@gmail.com wrote: I am experimenting on a fork of vim-plug for managing vim plugins. I wanted to add parallel update support for python since ruby isn't nearly as common. I've come across a weird bug that only seems to happen when I'm inside

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d802fb6ae32 by Ethan Furman in branch 'default': Issue20284: Implement PEP461 https://hg.python.org/cpython/rev/8d802fb6ae32 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-23 Thread Rick Johnson
On Friday, January 23, 2015 at 4:42:51 PM UTC-6, Mario Figueiredo wrote: I'd rather it'd be a docstring parameter. - Decorators are transformation tools. Which type hints are not. Valid point. - keywords should be few and used only for language features. Static analysis isn't and should

Re: Python is DOOMED! Again!

2015-01-23 Thread Rick Johnson
On Thursday, January 22, 2015 at 10:23:48 PM UTC-6, Steven D'Aprano wrote: Rick Johnson wrote: The solution is move the type hinting syntax completely out of the source file and into another file -- think of it as a Python Type Hinting Header File. The 1970s called, they want their bad

[issue23306] zlib.crc32 raises OverflowError at argument-parsing time on large strings

2015-01-23 Thread Danny Yoo
Danny Yoo added the comment: Unfortunately, fixing just zlib.crc32 isn't quite enough for our purposes. We still will see OverflowErrow in zipfile if compression is selected. Demonstration code: import zipfile ## Possible workaround:

Re: Python is DOOMED! Again!

2015-01-23 Thread Sturla Molden
On 23/01/15 04:53, Steven D'Aprano wrote: If your manager is so bad, why isn't he insisting that you program in PHP or Java or Algol 68 [insert name of some language you dislike] instead of Python? Is your bad manager forcing you to write Java-style code in Python, or insisting on Hungarian

Re: Python is DOOMED! Again!

2015-01-23 Thread Chris Angelico
On Sat, Jan 24, 2015 at 12:00 PM, Sturla Molden sturla.mol...@gmail.com wrote: But without a thriving community, Python has no value to me. If we add type hinting, then that community will go away, because other languages are better options. Who will win? Julia? Ruby? They are all waiting in

[issue23306] zlib.crc32 raises OverflowError at argument-parsing time on large strings

2015-01-23 Thread Danny Yoo
New submission from Danny Yoo: Reproduction steps: --- $ python2.7 -c import zlib;zlib.crc32('a'*(131)) Traceback (most recent call last): File string, line 1, in module OverflowError: size does not fit in an int --- We ran into this bug in zlib.crc32 when using zipfile.writestr() with a

  1   2   >