Re: Few Coding suggestions - resending

2015-01-12 Thread Ganesh Pal
On Mon, Jan 12, 2015 at 8:42 AM, Ganesh Pal ganesh1...@gmail.com wrote: On Sun, Jan 11, 2015 at 7:57 PM, Dave Angel da...@davea.name wrote: No idea how that represents a difference of 5 minutes. So I'll take a totally wild guess that you meant: Sunday 23:50 23:55 Monday 00:00 00:05

[issue23160] Respect the environment variable SVNROOT in external-common.bat

2015-01-12 Thread Anselm Kruis
Anselm Kruis added the comment: Your guess is correct, it will be a null merge into default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23160 ___

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

2015-01-12 Thread Ethan Furman
Ethan Furman added the comment: I've been digging into this over the last week and come to the realization that I won't be able to finish this patch. My apologies. Victor, can you take over? I would appreciate it. The tests I have written are only for the Python side. The patch I was

[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-01-12 Thread STINNER Victor
STINNER Victor added the comment: The attached patch lacks an unit test. When I will be able to build CPython again, I will try the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22977

[issue23221] a(n) the, the a(n) typos

2015-01-12 Thread Karan Goel
Karan Goel added the comment: Hey I'll be working on this and submitting a patch. -- nosy: +karan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23221 ___

Track down SIGABRT

2015-01-12 Thread Israel Brewster
I have a long-running python/CherryPy Web App server process that I am running on Mac OS X 10.8.5. Python 2.7.2 running in 32-bit mode (for now, I have the code in place to change over to 64 bit, but need to schedule the downtime to do it). On the 6th of this month, during normal operation from

[issue23193] Please support numeric_owner in tarfile

2015-01-12 Thread Eric V. Smith
Eric V. Smith added the comment: I think Michael is asking if the proposed change would ever be accepted. If the answer is no, not even if you write the tests and update the documentation, then there's no sense putting the work into this. That seems like a reasonable question to me. I think

Re: annoying doctest problem

2015-01-12 Thread Mark Lawrence
On 12/01/2015 13:00, Steven D'Aprano wrote: Skip Montanaro wrote: ISTR that when Tim Peters first implemented first, the typical way you were expected to get tests into a doc string was to copy from an interactive session, which would not have this problem. I believe that is still documented

Re: annoying doctest problem

2015-01-12 Thread Steven D'Aprano
Skip Montanaro wrote: ISTR that when Tim Peters first implemented first, the typical way you were expected to get tests into a doc string was to copy from an interactive session, which would not have this problem. I believe that is still documented as the way to generate doctests. Also, to

Re: class-based class decorator

2015-01-12 Thread Albert-Jan Roskam
- Original Message - From: Ian Kelly ian.g.ke...@gmail.com To: Python python-list@python.org Cc: Sent: Saturday, January 10, 2015 7:30 AM Subject: Re: class-based class decorator On Fri, Jan 9, 2015 at 2:26 PM, Albert-Jan Roskam fo...@yahoo.com.dmarc.invalid wrote: Hi,

[issue23193] Please support numeric_owner in tarfile

2015-01-12 Thread R. David Murray
R. David Murray added the comment: I concur that this is a reasonable feature request, and it is not one that can be satisfied without modifying the tarfile module (that is, you can't write a simple wrapper to tarfile to get the functionality desired without cutting and pasting the entire

[issue23189] Set docstrings to empty string when optimizing with -OO.

2015-01-12 Thread Jarle Selvåg
Jarle Selvåg added the comment: I agree that -OO does what (people have agreed) it's supposed to do. Many packages manipulates the docstring without checking for 'None' (see list below). For many package developers, it seems hard to remember that the docstrings may disappear after

Re: Few Coding suggestions - resending

2015-01-12 Thread Ganesh Pal
Thanks to all and dear Dave Angel, I got this working :) , using your valuable inputs . Here is the final program: Throttling-1# cat sleep_schedule_file.py #!/usr/bin/python import time import pdb from datetime import date, time, datetime, timedelta #'''run these on the remote commmand ''' n

Reg: scrappring error

2015-01-12 Thread Sushanth
​Traceback (most recent call last): File sample.py, line 28, in module scrape_data(row['All Samples'],row['URL']) File sample.py, line 13, in scrape_data html = etree.HTML(urllib2.urlopen(url).read()) File C:\Users\sushanth.thangamani\AppData\Local\Continuum\Anaconda\lib\urllib 2.py,

unidecode

2015-01-12 Thread Jacob Kruger
Along lines of recent queries/questions, which had mostly sorted out, but, which was still trying to fine tune with regards to text file formats, in terms of writing as strings, or as binary files, and where was still trying to decide if wanted to worry about maybe specifically just handling

PythonFOSDEM 2015 - Schedule Updated… We will start at 10:30 AM

2015-01-12 Thread Stéphane Wirtel
Dear Python Community, Because the FOSDEM will start at 10:30 AM on Saturday 31st January, the first talk will be at 10:30 AM. Thus all the talks will be ajusted. The Schedule on the site of FOSDEM and on the PythonFOSDEM site have been updated.

[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2015-01-12 Thread Dmitry Shachnev
Changes by Dmitry Shachnev mity...@gmail.com: Added file: http://bugs.python.org/file37683/issue22932_combined.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22932 ___

Re: annoying doctest problem

2015-01-12 Thread Skip Montanaro
On Mon, Jan 12, 2015 at 6:15 AM, Skip Montanaro skip.montan...@gmail.com wrote: ... first implemented first ... s/first/doctest/ Darn auto-correct... Skip -- https://mail.python.org/mailman/listinfo/python-list

[issue23221] a(n) the, the a(n) typos

2015-01-12 Thread Karan Goel
Karan Goel added the comment: There we go. I fixed all the reported typos using the best of my knowledge. -- keywords: +patch Added file: http://bugs.python.org/file37680/issue23221.patch ___ Python tracker rep...@bugs.python.org

[issue23209] asyncio: break some cycles

2015-01-12 Thread Martin Richard
Martin Richard added the comment: I updated the selector patch so BaseSelector.get_key() raises KeyError if the mapping is None. All the (non skipped) tests in test_selectors.py passed. Anyway, if there is an other problem with freeing the mapping object (I don't know, maybe reopening a loop

[issue23209] asyncio: break some cycles

2015-01-12 Thread STINNER Victor
STINNER Victor added the comment: I opened the issue #23225 selectors: raise an exception if the selector is closed which is a different approach (but it should also fix the reference cycle, I kept the self._map = None change). -- ___ Python

[issue23225] selectors: raise an exception if the selector is closed

2015-01-12 Thread STINNER Victor
New submission from STINNER Victor: I propose to raise a RuntimeError exception on operations of a selector when the selector is closed. I'm not sure that RuntimeError is the most common exception: - io and gzip raise ValueError - asyncio raises RuntimeError (and selectors is linked to

Re: annoying doctest problem

2015-01-12 Thread Skip Montanaro
ISTR that when Tim Peters first implemented first, the typical way you were expected to get tests into a doc string was to copy from an interactive session, which would not have this problem. Also, to Steven's comment about fussiness, it isn't so much that it's fussy. It's more that it's dumb. I

Happy new year with Dipy 0.8!

2015-01-12 Thread Eleftherios Garyfallidis
Dear all, We are very happy to announce a new release of Diffusion Imaging in Python (Dipy). Here is a summary of the most important new features and developments. DIPY 0.8.0 (Released on Tuesday, 6 Jan 2015) Nonlinear Image-based Registration (SyN) An implementation of the Symmetric

Re: Array of hash table

2015-01-12 Thread Jason Friedman
Can any one tell me how to create graph={ nodes: [ { id: n0, label: A node, x: 0, [ ... elided ... ] } ] } Taking a guess and guessing that graphviz might be useful for you: https://code.google.com/p/pydot/. --

IMAPClient 0.12

2015-01-12 Thread Menno Smits
IMAPClient is an easy-to-use, Pythonic and complete IMAP client library. Version 0.12 has just been released with the following highlights: * Unicode handling has been fixed. Some bad decisions were made during the Python 3 port (v0.10) and this release fixes that. Bytes are now returned in

Re: application console with window

2015-01-12 Thread Amir Arsalan
and u have another below choice http://docs.python.org/howto/curses.html http://urwid.org/ On Thu, Jan 8, 2015 at 12:54 AM, Amir Arsalan am1r.ar3a...@gmail.com wrote: Hi adam, U can use from npyscreen. Npyscreen.readthedocs.org On Jan 8, 2015 12:50 AM, adam a...@poczta.emiter-uslugi.pl

Re: application console with window

2015-01-12 Thread Amir Arsalan
Hi adam, U can use from npyscreen. Npyscreen.readthedocs.org On Jan 8, 2015 12:50 AM, adam a...@poczta.emiter-uslugi.pl wrote: Is in here maybe someone who speak Polish? I would like to write application witch looks like this http://linuxiarze.pl/obrazy/internet1/ceni1.png I'm looking for

Re: annoying doctest problem

2015-01-12 Thread Steven D'Aprano
Mark Lawrence wrote: If doctest is dumb then that's clearly down to the author.  Perhaps we should refer him or her to the Zen of Python so they don't repeat the mistake with future design decisions? o_O I don't even ... wait ... [starts typing] [stops typing] ... okay. -- Steven

[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-01-12 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - patch review versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22977 ___

Re: Python 3 regex?

2015-01-12 Thread Ian
On 12/01/2015 18:03, Jason Bailey wrote: Hi all, I'm working on a Python _3_ project that will be used to parse ISC DHCPD configuration files for statistics and alarming purposes (IP address pools, etc). Anyway, I'm hung up on this one section and was hoping someone could provide me with

Re: Python 3 regex?

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 5:03 AM, Jason Bailey jbai...@emerytelcom.com wrote: Unfortunately, I get no matches. From output on the command line, I can see that Python is adding extra backslashes to my re.compile string. I have added the raw 'r' in front of the strings to prevent it, but to no

Re: Python 3 regex woes (parsing ISC DHCPD config)

2015-01-12 Thread Dave Angel
On 01/12/2015 01:20 PM, Jason Bailey wrote: Hi all, What changed between 1:03 and 1:20 that made you post a nearly identical second message, as a new thread? Unfortunately, I get no matches. From output on the command line, I can see that Python is adding extra backslashes to my

Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread John Ladasky
I've never come across this before. Here's a minimal example (in Python 3.4): Code: - d = {0:a, 1:b, 2:c, 3:d} e = [d[x] for x in (0,2)] class Foo: f = {0:a, 1:b, 2:c, 3:d} print(f) g = [f[x] for x in (0,2)] foo

Re: Python 3 regex?

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 6:48 AM, Ian hobso...@gmail.com wrote: My recommendation would be to write a recursive decent parser for your files. That way will be easier to write, much easier to modify and almost certainly faster that a RE solution - and it can easily give you all the information

Re: Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread John Ladasky
Following up to myself: I finally did the right keyword search, and found a relevant article: http://stackoverflow.com/questions/13905741/accessing-class-variables-from-a-list-comprehension-in-the-class-definition Maybe I HAVE tried to define a list comprehension inside a class definition

Re: Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 7:25 AM, John Ladasky john_lada...@sbcglobal.net wrote: When I am working inside the class namespace, the print function call on line 8 recognizes the name f and prints the dictionary bound to that name. However, the LIST COMPREHENSION defined inside the class

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Tim Golden
On 12/01/2015 18:02, Andrew Koenig wrote: Downloaded and installed 64-bit Python 3.4 and pywin32-219. Both installed smoothly on my 64-bit Win7 machine. I added C:\Python34 to the search path. If I launch a Windows command window and run python -m ensurepip I get the following:

[issue19777] Provide a home() classmethod on Path objects

2015-01-12 Thread STINNER Victor
STINNER Victor added the comment: +def _test_home(self, p): +q = self.cls(os.path.expanduser('~')) +self.assertEqual(p, q) +self.assertEqual(str(p), str(q)) +self.assertIs(type(p), type(q)) +self.assertTrue(p.is_absolute()) + +def test_home(self):

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
python --version reports 3.4.2, which is what I expected. I see no PYTHONPATH variable, or any environment variable with a name beginning PY (either upper or lower case). -- https://mail.python.org/mailman/listinfo/python-list

Broken IF statement

2015-01-12 Thread joboppsgpp
https://bpaste.net/show/93be9e15634b --- Line 19 through 22 At all times, my program is assigning the object priority of 0, even if one already exists in the database with a priority of 0 (it's supposed to be assigning it a priority of 1 in those cases). I'm a non developer trying to fix a

Re: Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread Ethan Furman
On 01/12/2015 12:25 PM, John Ladasky wrote: d = {0:a, 1:b, 2:c, 3:d} e = [d[x] for x in (0,2)] class Foo: f = {0:a, 1:b, 2:c, 3:d} print(f) g = [f[x] for x in (0,2)] In Foo 'f' is part of an unnamed namespace; the list comp 'g' has its own namespace, effectively making be a

Re: Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread John Ladasky
On Monday, January 12, 2015 at 12:41:30 PM UTC-8, Ethan Furman wrote: In Foo 'f' is part of an unnamed namespace; the list comp 'g' has its own namespace, effectively making be a nonlocal; class name lookup skips nonlocal namespaces. Workaround: use an actual for loop. Thanks, Ethan.

[issue19777] Provide a home() classmethod on Path objects

2015-01-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4a55b98314cd by Antoine Pitrou in branch 'default': Issue #19777: Provide a home() classmethod on Path objects. https://hg.python.org/cpython/rev/4a55b98314cd -- nosy: +python-dev ___ Python tracker

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
It runs and creates a classes.txt file with 803 lines. The first few: class 'str' - '$cpfile12' class 'str' - '$crfile12' class 'str' - '$cxfile12' class 'str' - '*' class 'str' - '.$cp' class 'str' - '.$cr' class 'str' - '.$cx' class 'str' - '.386' class 'str' - '.3ds' A few lines in the middle

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-12 Thread Steve Dower
Steve Dower added the comment: Is the libpython27.a file actually a 32-bit version or is it just corrupted? It seems to be considerably smaller than the version in the 32-bit installer, but it is certainly not being generated from the 32-bit version. I didn't write this code originally, and I

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Tim Golden
On 12/01/2015 21:45, Andrew Koenig wrote: It runs and creates a classes.txt file with 803 lines. The first few: class 'str' - '$cpfile12' class 'str' - '$crfile12' class 'str' - '$cxfile12' class 'str' - '*' class 'str' - '.$cp' class 'str' - '.$cr' class 'str' - '.$cx' class 'str' - '.386'

Re: Broken IF statement

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 8:19 AM, jobopps...@gmail.com wrote: https://bpaste.net/show/93be9e15634b --- Line 19 through 22 At all times, my program is assigning the object priority of 0, even if one already exists in the database with a priority of 0 (it's supposed to be assigning it a

[issue23225] selectors: raise an exception if the selector is closed

2015-01-12 Thread Charles-François Natali
Charles-François Natali added the comment: RuntimeError sounds better to me (raising ValueError when no value is provided, e.g. in select() sounds definitely strange). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23225

[issue1250] Building external modules using Sun Studio 12

2015-01-12 Thread Erik O'Shaughnessy
Erik O'Shaughnessy added the comment: Still seeing this issue on Solaris 11 with Solaris Studio compilers when building pandas 0.15.2 and matplotlib 1.4.2. -- nosy: +Erik.O'Shaughnessy ___ Python tracker rep...@bugs.python.org

Re: Broken IF statement

2015-01-12 Thread joboppsgpp
Thanks Chris. This definitely helps. I will test it and see what happens. In terms of the previous code, what it was intended to do wasn't actually happening. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 regex woes (parsing ISC DHCPD config)

2015-01-12 Thread Albert-Jan Roskam
- Original Message - From: Jason Bailey jbai...@emerytelcom.com To: python-list@python.org Cc: Sent: Monday, January 12, 2015 7:20 PM Subject: Python 3 regex woes (parsing ISC DHCPD config) Hi all, I'm working on a Python _3_ project that will be used to parse ISC DHCPD

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-12 Thread Zach Welch
Zach Welch added the comment: The libpython27.a is an actual 32-bit version, as confirmed by running objdump -t on it. It reports the sections' file format as pe-i386 instead of pe-x86-64. I am only using it for building for the 64-bit target, so I cannot confirm its viability for 32-bit

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

2015-01-12 Thread Andrew Robinson
On 01/07/2015 04:04 PM, Ethan Furman wrote: On 01/06/2015 07:37 PM, Andrew Robinson wrote: Explain; How does mere subclassing of bool break the contract that bool has? eg: What method or data would the superclass have that my subclass would not? bool's contract is that there are only two

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

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 9:27 AM, Andrew Robinson andr...@r3dsolutions.com wrote: Huh? I'm not adding any values when I merely subclass bool ; and even if the subclass could be instantiated -- that's doesn't mean a new value or instance of the base class (bool) must exist. For I could happily

What does pip install do?

2015-01-12 Thread Fabien
Folks, I've learned a lot today about python packaging and stuff, thanks to a couple of good websites. I've learned how to install a package from PyPi with pip, choose which version, upgrade it, uninstall it, use virtualenv, BUT I'm still asking myself: what does pip install *concretely* do

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
Not sure that would be a good idea: There are 22 such keys, as opposed to only two keys with Windows ID strings that don't end in nulls. I found this article: http://www.swarley.me.uk/blog/2014/04/23/python-pip-and-windows-registry-corruption/ with the comment If you are happy to completely

[issue23185] add inf and nan to math module

2015-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Should inf and nan be added to cmath too? It has e and pi and isnan() and isinf()... Also complex(0, math.nan) a value that is printed as nanj and complex(nanj) parses and returns such a value, so the point could be made that there should be a constant

[issue23226] Add float linspace recipe to docs

2015-01-12 Thread Andrew Barnert
New submission from Andrew Barnert: In a recent thread on python-ideas (https://mail.python.org/pipermail/python-ideas/2015-January/030817.html), it was concluded that Python should not have a range-like type for floats in the stdlib, but there should be some simple discussion of the

Re: What does pip install do?

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 9:35 AM, Fabien fabien.mauss...@gmail.com wrote: I've learned a lot today about python packaging and stuff, thanks to a couple of good websites. I've learned how to install a package from PyPi with pip, choose which version, upgrade it, uninstall it, use virtualenv,

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-12 Thread Robert Collins
Robert Collins added the comment: w.r.t. a new linecache interface, it looks like we need two attributes from f_globals: __name__ and __loader__, so that we can eventually call __loader__.get_source(__name__). One small change (to let me focus on traceback) would be to add another kw

[issue22729] `wait` and `as_completed` depend on private api

2015-01-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: -1. Sorry, I don't see the reason for making custom `Future` class. Can you elaborate? -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22729

[issue22286] Allow backslashreplace error handler to be used on input

2015-01-12 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22286 ___ ___ Python-bugs-list

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Andrew Koenig
Fixed it! The aforementioned article is correct. I downloaded the RegDelNull program mentioned in the article (http://technet.microsoft.com/en-us/sysinternals/bb897448.aspx) and ran it on hkcr, hkcu, hklm, hku, and hkcc (short for HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE,

Re: Python 3 regex?

2015-01-12 Thread Rick Johnson
'Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems.' - Jamie Zawinski. This statement is one of my favorite examples of powerful propaganda, which has scared more folks away from regexps than even the Upright Citizens Brigade

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-01-12 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15836 ___ ___ Python-bugs-list

[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-01-12 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: patch review - commit review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15836 ___

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

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 12:59 PM, Andrew Robinson andr...@r3dsolutions.com wrote: There is no need to copy data from an initialized superclass instance into a subclass instance that has no new data, but only rebind -- or add a binding/proxy object -- to bind the superclass instance to the

Re: Python 3 regex?

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 10:47 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: WHO'S LAUGHING NOW? -- YOU MINDLESS ROBOTS! It's very satisfying when mindless robots laugh. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

[issue9587] unittest.assertRaises() return the raised exception

2015-01-12 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9587 ___ ___ Python-bugs-list

[issue19777] Provide a home() classmethod on Path objects

2015-01-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed the patch, thank you! -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19777

[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-01-12 Thread Martin Panter
Martin Panter added the comment: This patch includes a test case, based on Eryksun’s exception code -- Added file: http://bugs.python.org/file37686/win-error-format-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22977

Re: Python 3 regex?

2015-01-12 Thread Rick Johnson
On Monday, January 12, 2015 at 7:55:32 PM UTC-6, Mark Lawrence wrote: On 12/01/2015 23:47, Rick Johnson wrote: 'Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems.' - Jamie Zawinski. [snip] If you wish to use a hydrogen

Re: Reg: scrappring error

2015-01-12 Thread Emile van Sebille
On 1/11/2015 9:27 PM, Sushanth wrote: SNIP urllib2.HTTPError: HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop. Looks like the server has a link on this page pointing back to itself or somesuch. Does this help? Emile --

[issue23226] Add float linspace recipe to docs

2015-01-12 Thread Andrew Barnert
Andrew Barnert added the comment: As suggested by the review: removing unnecessary parenthetical, changing ulp to digit, and fixing the recipe link. -- Added file: http://bugs.python.org/file37685/stdtypes.rst.diff ___ Python tracker

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

2015-01-12 Thread Andrew Robinson
On 01/12/2015 02:35 PM, Chris Angelico wrote: On Tue, Jan 13, 2015 at 9:27 AM, Andrew Robinson andr...@r3dsolutions.com wrote: Huh? I'm not adding any values when I merely subclass bool ; and even if the subclass could be instantiated -- that's doesn't mean a new value or instance of the base

Re: Track down SIGABRT

2015-01-12 Thread Jason Friedman
I have a long-running python/CherryPy Web App server process that I am running on Mac OS X 10.8.5. Python 2.7.2 running in 32-bit mode (for now, I have the code in place to change over to 64 bit, but need to schedule the downtime to do it). On the 6th of this month, during normal operation

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

2015-01-12 Thread Andrew Robinson
Hmm LOL ... no exception was raised... and we know if the assertion Failed, an exception ought to be raised: The assertion did not fail. There are three parts, and as long as one of them is true, the assertion will pass: 1) x isn't an instance of bool 2) x is the object known as True 3) x

Re: Python 3 regex?

2015-01-12 Thread Mark Lawrence
On 12/01/2015 23:47, Rick Johnson wrote: 'Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems.' - Jamie Zawinski. [normal cobblers snipped] If you wish to use a hydrogen bomb instead of a tooth pick feel free, I won't lose

[issue23224] LZMADecompressor object is only initialized in __init__

2015-01-12 Thread Martin Panter
Martin Panter added the comment: A patch for this might conflict with the LZMA patch for Issue 15955, so it would be simplest to wait for that issue to be resolved first -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23224

[issue22932] email.utils.formatdate uses unreliable time.timezone constant

2015-01-12 Thread R. David Murray
R. David Murray added the comment: The tests fail for me the same way both before and after the code patch: == FAIL: test_formatdate (test.test_email.test_utils.FormatDateTests)

Re: Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread Steven D'Aprano
On Mon, 12 Jan 2015 12:40:13 -0800, Ethan Furman wrote: On 01/12/2015 12:25 PM, John Ladasky wrote: d = {0:a, 1:b, 2:c, 3:d} e = [d[x] for x in (0,2)] class Foo: f = {0:a, 1:b, 2:c, 3:d} print(f) g = [f[x] for x in (0,2)] In Foo 'f' is part of an unnamed namespace; the

[issue10552] Tools/unicode/gencodec.py error

2015-01-12 Thread Martin Panter
Martin Panter added the comment: Here is a new version of Kuchling’s patch. I restored some mapping files which do not give any errors (including the mac_turkish codec, which is actually documented), and removed both readme files. -- components: +Unicode nosy: +haypo, vadmium

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

2015-01-12 Thread Ian Kelly
On Mon, Jan 12, 2015 at 9:16 PM, Andrew Robinson andr...@r3dsolutions.com wrote: Instead of pretending what if -- let's actually REPLACE python's built in bool class with an emulation that ALLOWS subclassing and THEN let's TEST my hypothesis that the assert statement you gave me can't tell the

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

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 3:57 PM, Steven D'Aprano st...@pearwood.info wrote: On Tue, 13 Jan 2015 09:35:43 +1100, Chris Angelico wrote: Subclassing bool breaks this invariant, unless you never instantiate the subclass, in which case it's completely useless. Not necessarily. A class that you

Re: class-based class decorator

2015-01-12 Thread Ian Kelly
On Jan 12, 2015 6:47 AM, Albert-Jan Roskam fo...@yahoo.com wrote: Thanks for your replies. I changed it into a regular decorator (not a class decorator). It would have been even nicer if I only needed to specify it once per class, but, well, in my case this hardly matters. The code below

Re: What does pip install do?

2015-01-12 Thread Fabien
On 12.01.2015 23:46, Chris Angelico wrote: On Tue, Jan 13, 2015 at 9:35 AM, Fabienfabien.mauss...@gmail.com wrote: BUT I'm still asking myself: what does pip install*concretely* do on my virtual environment? As far as I know, it's equivalent to three steps: 1) Download the appropriate

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

2015-01-12 Thread Chris Angelico
On Tue, Jan 13, 2015 at 4:32 PM, Steven D'Aprano st...@pearwood.info wrote: Crashing the interpreter from pure Python code is *absolutely not allowed*, so anything which would allow that is forbidden. Except when you willingly shoot yourself in the foot. rosuav@sikorsky:~$ python Python 2.7.3

Re: Using a ChangeLog as a canonical source of package metadata

2015-01-12 Thread Steven D'Aprano
On Mon, 12 Jan 2015 05:24:00 -0800, wxjmfauth wrote: To tell you the truth, I'm unable to put your product to work. If you follow the instructions in the README, and it still doesn't work, that's a bug and I will be happy to fix it. If you insist on doing things your own way, and breaking

Re: Python 3 regex?

2015-01-12 Thread Steven D'Aprano
On Mon, 12 Jan 2015 19:48:18 +, Ian wrote: My recommendation would be to write a recursive decent parser for your files. That way will be easier to write, I know that writing parsers is a solved problem in computer science, and that doing so is allegedly one of the more trivial things

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

2015-01-12 Thread Steven D'Aprano
On Mon, 12 Jan 2015 17:59:42 -0800, Andrew Robinson wrote: [...] What I am wanting to know is WHY did Guido think it so important to do that ? Why was he so focused on a strict inability to have any instances of a bool subclass at all -- that he made a very arbitrary exception to the

Re: Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread Ethan Furman
On 01/12/2015 08:49 PM, Steven D'Aprano wrote: On Mon, 12 Jan 2015 12:40:13 -0800, Ethan Furman wrote: [...] class name lookup skips nonlocal namespaces. Actually, no it doesn't. [...] The problem is that *functions* lookup don't include the class body in their scope. Ah, thanks for

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread Tim Golden
On 12/01/2015 23:12, Andrew Koenig wrote: Fixed it! The aforementioned article is correct. I downloaded the RegDelNull program mentioned in the article (http://technet.microsoft.com/en-us/sysinternals/bb897448.aspx) and ran it on hkcr, hkcu, hklm, hku, and hkcc (short for HKEY_CLASSES_ROOT,

[RELEASE] ‘python-daemon’ version 2.0.2 released

2015-01-12 Thread Ben Finney
Howdy all, I am pleased to announce the release of version 2.0.2 of the ‘python-daemon’ library. The current release is always available at URL:https://pypi.python.org/pypi/python-daemon/. The project's forums and VCS are hosted at Alioth URL:https://alioth.debian.org/projects/python-daemon/.

Re: Python 3 regex?

2015-01-12 Thread Mark Lawrence
On 13/01/2015 02:53, Rick Johnson wrote: On Monday, January 12, 2015 at 7:55:32 PM UTC-6, Mark Lawrence wrote: On 12/01/2015 23:47, Rick Johnson wrote: 'Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems.' - Jamie Zawinski.

Re: Python 3 regex?

2015-01-12 Thread Steven D'Aprano
On Mon, 12 Jan 2015 15:47:08 -0800, Rick Johnson wrote: 'Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems.' - Jamie Zawinski. I wonder if Jamie's conclusions are a result of careful study, or merely, an attempt to resolve

[issue23227] Generator's finally block not run if close() called before first iteration

2015-01-12 Thread Stephen Drake
New submission from Stephen Drake: If a generator has its close() method called before any items are requested from it, a finally block in the generator function will not be executed. I encountered this when wrapping an open file to alter the result of iterating over it. Using a generator

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

2015-01-12 Thread Steven D'Aprano
On Tue, 13 Jan 2015 09:35:43 +1100, Chris Angelico wrote: Subclassing bool breaks this invariant, unless you never instantiate the subclass, in which case it's completely useless. Not necessarily. A class that you never instantiate, but use as an object itself, is another way of implementing

Re: I must be missing something obvious in installing Python 3.4.2...

2015-01-12 Thread cjgohlke
On Monday, January 12, 2015 at 10:09:03 PM UTC-8, Tim Golden wrote: On 12/01/2015 23:12, Andrew Koenig wrote: Fixed it! The aforementioned article is correct. I downloaded the RegDelNull program mentioned in the article (http://technet.microsoft.com/en-us/sysinternals/bb897448.aspx) and

Re: class-based class decorator

2015-01-12 Thread Jean-Michel Pichavant
- Original Message - From: Albert-Jan Roskam fo...@yahoo.com.dmarc.invalid import functools import inspect import warnings warnings.simplefilter(always) class check_deprecated_args(object): def __init__(self, deprecated_params, msg=None): self.deprecated_params =

  1   2   >