[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Hi Demian, my intention is to demonstrate normal usage of Python’s HTTP client, whether or not its implementation misbehaves. I am trying to demonstrate a valid persistent server that happens to decide to close the connection after the first request but before

Re: Concerning Dictionaries and += in Python 2.x

2015-01-19 Thread MRAB
On 2015-01-20 00:12, Luke Tomaneng wrote: I have been having a bit of trouble with the things mentioned in the title. I have written the following script for a Codecademy course: stock = { banana: 6, apple: 0, orange: 32, pear: 15 } prices = { banana: 4, apple: 2,

Re: Concerning Dictionaries and += in Python 2.x

2015-01-19 Thread Chris Angelico
On Tue, Jan 20, 2015 at 11:34 AM, Luke Tomaneng luketoman...@gmail.com wrote: Thanks Chris / Mr. Angelico / whatever you prefer. I attempted to post a reply to you before but it could not be viewed even after refreshing several times. You've been helpful. My pleasure! Your earlier email did

[issue23276] hackcheck is broken in association with __setattr__

2015-01-19 Thread eryksun
eryksun added the comment: super(type, cls).__setattr__(key, value) In your case, super(type, cls).__setattr__ references object.__setattr__. super(type, MyClass).__setattr__.__objclass__ class 'object' That's from the method resolution order (__mro__):

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: On Tue, Jan 20, 2015 at 11:38 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: That's the beauty of free speech: We have right to be annoyed, and the author has the right not to give a damn. The only alternative is fascist censorship, and I'll

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Calling self.wfile.write(b) should be equivalent to not calling write() at all, as far as I understand. Using strace, it does not seem to invoke send() at all. So the result will depend on what is written next. In the case of my code, nothing is written next;

[issue20702] warning in cmdline.rst

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: I couldn't reproduce it with Sphinx 1.2.3. The only warning I got was Doc/whatsnew/3.4.rst:2138: WARNING: undefined label: idle (if the link has no caption the label must precede a section header) -- nosy: +berker.peksag resolution: - out of date

Re: Trees

2015-01-19 Thread Michael Torrie
On 01/19/2015 04:08 PM, Steven D'Aprano wrote: Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Possibly because they aren't needed? Under what circumstances would you use a tree instead of a list or a dict or combination of both? That's not a rhetorical

Re: Trees

2015-01-19 Thread Devin Jeanpierre
On Mon, Jan 19, 2015 at 3:08 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Possibly because they aren't needed? Under what circumstances would you use a tree instead of a list or a dict or

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Robert Collins
Robert Collins added the comment: FWIW, I agree with the analysis here, its standard HTTP behaviour in the real world, and we should indeed handle it. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3566

Re: Trees

2015-01-19 Thread Dan Stromberg
On Mon, Jan 19, 2015 at 2:06 PM, Zachary Gilmartin zacharygilmar...@gmail.com wrote: Why aren't there trees in the python standard library? Trees are kind of specialized datastructures; no one type of tree solves all tree-related problems suitably well. I think probably the most common need for

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Mark Lawrence
On 20/01/2015 00:15, 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? I've never seen any of these reading

Re: Trees

2015-01-19 Thread Dan Stromberg
On Mon, Jan 19, 2015 at 6:46 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 20/01/2015 00:49, Dan Stromberg wrote: On Mon, Jan 19, 2015 at 2:06 PM, Zachary Gilmartin zacharygilmar...@gmail.com wrote: Why aren't there trees in the python standard library? Trees are kind of specialized

Re: Trees

2015-01-19 Thread Steven D'Aprano
Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Possibly because they aren't needed? Under what circumstances would you use a tree instead of a list or a dict or combination of both? That's not a rhetorical question. I am genuinely curious, what task do you have

Re: Trees

2015-01-19 Thread Tim Chase
On 2015-01-19 16:19, Michael Torrie wrote: On 01/19/2015 04:08 PM, Steven D'Aprano wrote: Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Possibly because they aren't needed? Under what circumstances would you use a tree instead of a list or a dict or

[issue2292] Missing *-unpacking generalizations

2015-01-19 Thread Neil Girdhar
Neil Girdhar added the comment: Updated the patch for 3.5. Currently, building fails with TypeError: init_builtin() takes exactly 1 argument (0 given) This is probably due to an argument counting bug, but I am not sure how to debug it. -- nosy: +neil.g Added file:

Re: Concerning Dictionaries and += in Python 2.x

2015-01-19 Thread Luke Tomaneng
Thanks Chris / Mr. Angelico / whatever you prefer. I attempted to post a reply to you before but it could not be viewed even after refreshing several times. You've been helpful. -- https://mail.python.org/mailman/listinfo/python-list

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: Sorry Martin, I should really not dig into issues like this first thing in the morning ;) My concern about the proposed change isn't whether or not it isn't valid HTTP behaviour, it is. My concern (albeit a small one) is that the change implies an assumption

Re: Trees

2015-01-19 Thread Mark Lawrence
On 19/01/2015 22:06, Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Probably because you'd never get agreement as to which specific tree and which specific implementation was the most suitable for inclusion. -- My fellow Pythonistas, ask not what our

Random ALL CAPS posts on this group

2015-01-19 Thread Luke Tomaneng
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? -- https://mail.python.org/mailman/listinfo/python-list

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Steven D'Aprano
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? They're spam, and depending on how you are accessing this group you may or may

[issue23278] multiprocessing maxtasksperchild=1 + logging = task loss

2015-01-19 Thread Nelson Minar
New submission from Nelson Minar: I have a demonstration of a problem where the combination of multiprocessing with maxtasksperchild=1 and the Python logging library causes tasks to occasionally get lost. The bug might be related to issue 22393 or issue 6721, but I'm not certain. issue 10037

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Chris Angelico
On Tue, Jan 20, 2015 at 2:50 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: Of course the kill file has such a gloriously revengeful sound to it though! ;-) http://bofh.ntk.net/BOFH//bastard-sm2.php ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Concerning Dictionaries and += in Python 2.x

2015-01-19 Thread Luke Tomaneng
I have been having a bit of trouble with the things mentioned in the title. I have written the following script for a Codecademy course: stock = { banana: 6, apple: 0, orange: 32, pear: 15 } prices = { banana: 4, apple: 2, orange: 1.5, pear: 3 } def

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Rustom Mody
On Tuesday, January 20, 2015 at 5:52:54 AM UTC+5:30, Chris Angelico wrote: On Tue, Jan 20, 2015 at 11:15 AM, 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

Re: Concerning Dictionaries and += in Python 2.x

2015-01-19 Thread Luke Tomaneng
On Monday, January 19, 2015 at 4:21:58 PM UTC-8, Chris Angelico wrote: On Tue, Jan 20, 2015 at 11:12 AM, Luke Tomaneng wrote: def compute_bill(food): total = 0 for item in food: if stock[item] 0: total += prices[item] stock[item] = stock[item]

[issue23277] Cleanup unused and duplicate imports in tests

2015-01-19 Thread Jon Dufresne
New submission from Jon Dufresne: Ran variations of the command: $ find . -wholename '*/test/*.py' | xargs flake8 --select=F401,F811 To look for unused or duplicate imports. The attached patch removes them. -- components: Tests files: cleanup-unused-imports.patch keywords: patch

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-19 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255 ___ ___

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

2015-01-19 Thread Robert Collins
Robert Collins added the comment: Stack and Frame looking good, next update will be next Monday, when I finish off my TracebackException class. -- Added file: http://bugs.python.org/file37782/issue17911-1.patch ___ Python tracker

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Rick Johnson
On Monday, January 19, 2015 at 7:55:11 PM UTC-6, Chris Angelico wrote: On Tue, Jan 20, 2015 at 11:38 AM, Rick Johnson wrote: That's the beauty of free speech: We have right to be annoyed, and the author has the right not to give a damn. The only alternative is fascist censorship, and I'll

[issue23278] multiprocessing maxtasksperchild=1 + logging = task loss

2015-01-19 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +sbt, vinay.sajip stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23278 ___ ___

Re: Trees

2015-01-19 Thread Joel Goldstick
On Mon, Jan 19, 2015 at 11:21 PM, Dan Stromberg drsali...@gmail.com wrote: On Mon, Jan 19, 2015 at 6:46 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 20/01/2015 00:49, Dan Stromberg wrote: apropos of nothing, I went to stonybrook too. beee 1978 On Mon, Jan 19, 2015 at 2:06 PM,

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Chris Angelico
On Tue, Jan 20, 2015 at 11:15 AM, Luke Tomaneng luketoman...@gmail.com 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? I haven't seen them.

Re: Trees

2015-01-19 Thread Mario Figueiredo
In article mailman.17862.1421705173.18130.python-l...@python.org, zacharygilmar...@gmail.com says... Why aren't there trees in the python standard library? I don't know much about python development process and strategies, but I suspect it shouldn't be much different from any other language

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Rick Johnson
On Monday, January 19, 2015 at 6:16:13 PM UTC-6, Luke Tomaneng wrote: Has anyone noticed [uppercase post content]? 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? A good

Re: Concerning Dictionaries and += in Python 2.x

2015-01-19 Thread Dan Stromberg
On Mon, Jan 19, 2015 at 4:12 PM, Luke Tomaneng luketoman...@gmail.com wrote: I have been having a bit of trouble with the things mentioned in the title. I have written the following script for a Codecademy course: stock = { banana: 6, apple: 0, orange: 32, pear: 15 }

Re: Trees

2015-01-19 Thread Mark Lawrence
On 20/01/2015 00:49, Dan Stromberg wrote: On Mon, Jan 19, 2015 at 2:06 PM, Zachary Gilmartin zacharygilmar...@gmail.com wrote: Why aren't there trees in the python standard library? Trees are kind of specialized datastructures; no one type of tree solves all tree-related problems suitably

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Rick Johnson
On Monday, January 19, 2015 at 8:16:01 PM UTC-6, 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. [...] So a forum such as this can block obnoxious

[issue20898] Missing 507 response description

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: Committed now, sorry about the delay. Thanks for the patch, Demian. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23279] test_site/test_startup_imports fails when mpl_toolkit or logilab based modules installed

2015-01-19 Thread Douglas Rudd
New submission from Douglas Rudd: pth files for logilab (e.g. logilab_common, logilab_astng) and mpl_toolkit (e.g. basemap, matplotlib) contain code like the following (taken from basemap 1.0.7): import sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'],

[issue22317] action argument is not documented in argparse add_subparser() docs

2015-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 350b8e109c42 by Berker Peksag in branch '3.4': Issue #22317: Document the action parameter in ArgumentParser.add_subparsers() docs. https://hg.python.org/cpython/rev/350b8e109c42 New changeset 4709290253e3 by Berker Peksag in branch 'default':

Re: Concerning Dictionaries and += in Python 2.x

2015-01-19 Thread Chris Angelico
On Tue, Jan 20, 2015 at 11:12 AM, Luke Tomaneng luketoman...@gmail.com wrote: def compute_bill(food): total = 0 for item in food: if stock[item] 0: total += prices[item] stock[item] = stock[item] - 1 return total Whenever I run this

[issue22317] action argument is not documented in argparse add_subparser() docs

2015-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 430236ef507b by Berker Peksag in branch '2.7': Issue #22317: Document the action parameter in ArgumentParser.add_subparsers() docs. https://hg.python.org/cpython/rev/430236ef507b -- ___ Python tracker

[issue22317] action argument is not documented in argparse add_subparser() docs

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Mike. Anne, thank you for the ticket triage! The only missing place was the ArgumentParser.add_subparsers() documentation: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_subparsers -- nosy:

Re: Random ALL CAPS posts on this group

2015-01-19 Thread Chris Angelico
On Tue, Jan 20, 2015 at 11:38 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: That's the beauty of free speech: We have right to be annoyed, and the author has the right not to give a damn. The only alternative is fascist censorship, and I'll happily endure these annoyances to prevent

[issue20121] quopri_codec newline handling

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Here is patch v2, which fixes some more bugs I uncovered in the quoted-printable encoders: * The binascii version would unnecessarily break a 76-character line (maximum length) if it would end with an =XX escape code * The native Python version would insert

[issue2292] Missing *-unpacking generalizations

2015-01-19 Thread Chris Angelico
Chris Angelico added the comment: The third version of the patch is huge compared to the other two. Is it all important? I'm seeing a different build failure, and with the size of patch, I'm not sure I'm well placed to figure out what's going on. -- cut -- Traceback (most recent call last):

[issue20898] Missing 507 response description

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: No worries, thanks for taking care of merging it Berker. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20898 ___

Re: Storing dataset from Condtional FreqDist

2015-01-19 Thread Jason Friedman
Hello i have trying to store information in arff file but i has been really. Any ideas of how can i do that? with open('fileids3.txt', 'r') as f: genres=[word.strip() for word in f.next().split(',')] with open('adjectifs2.txt', 'r') as g: adj = [word.strip() for word in

[issue20898] Missing 507 response description

2015-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset c8647dab4780 by Berker Peksag in branch 'default': Issue #20898: Add a HTTP status codes section to avoid duplication in HTTP docs. https://hg.python.org/cpython/rev/c8647dab4780 -- nosy: +python-dev

How to change the number into the same expression's string and vice versa?

2015-01-19 Thread contro opinion
In the python3 console: a=18 b='18' str(a) == b True int(b) == a True Now how to change a1,a2,a3 into b1,b2,b3 and vice versa? a1=0xf4 a2=0o36 a3=011 b1='0xf4' b2='0o36' b3='011' -- https://mail.python.org/mailman/listinfo/python-list

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: Calling self.wfile.write(b) should be equivalent to not calling write() at all, as far as I understand. Right (or at least, as I understand it as well). Really, this boils down to a philosophical debate: Should the standard library account for unexpected

[issue23277] Cleanup unused and duplicate imports in tests

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: +1 for cleanup. -- nosy: +berker.peksag stage: - patch review versions: +Python 3.4, Python 3.5 -Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23277

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

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

[issue23281] Access violation - pyc file

2015-01-19 Thread Paweł Zduniak
New submission from Paweł Zduniak: (950.e58): Access violation - code c005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. *** ERROR: Symbol file could not be found. Defaulted to export symbols for

Bodybuilding Helpful Advice

2015-01-19 Thread nedraskeating
Refuel Extreme helps control bloodflow in the body and so it helps determine mental performance, lungs, and also other important organs. This is one of many Best Bodybuilding Supplements you're able to take. It works within the skeletal muscles and will help communications are sent by the human

[issue23280] Convert binascii.{un}hexlify to Argument Clinic (fix docstrings)

2015-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23280 ___ ___

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Yeah I’m happy to put a patch together, once I have an idea of the details. I’d also like to understand your scenario that would mislead the user to believe that the connection has been closed when it actually hasn’t. Can you give a concrete example or

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread R. David Murray
R. David Murray added the comment: I think that in other stdlib networking modules, a connection closed error is raised when an operation is attempted on a closed connection. For example, in smtplib, the server may return an error code and then (contrary to the RFC) close the connection. We

[issue23280] Convert binascii.{un}hexlify to Argument Clinic (fix docstrings)

2015-01-19 Thread Zachary Ware
New submission from Zachary Ware: The Argument Clinic conversion of the binascii module left hexlify and unhexlify with bad docstrings: hexlify(...) b2a_hex($module, data, /) -- Hexadecimal representation of binary data. The return value is

Re: Trees

2015-01-19 Thread Terry Reedy
On 1/19/2015 5:06 PM, Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Sequences nested withing sequences can be regarded as trees, and Python has these. I regard Lisp as a tree processing languages, as it must be to manipulate, for example, code with nested

Re: Trees

2015-01-19 Thread Marko Rauhamaa
Mark Lawrence breamore...@yahoo.co.uk: On 19/01/2015 22:06, Zachary Gilmartin wrote: Why aren't there trees in the python standard library? Probably because you'd never get agreement as to which specific tree and which specific implementation was the most suitable for inclusion. Most

[issue20898] Missing 507 response description

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Just noticed the new documentation says “http.HTTPStatus.OK is also available as . . . http.server.OK”. I think this is wrong; only the client module (and now the top-level package) have those constants. The enum values are only available in the server module

[issue20898] Missing 507 response description

2015-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3a95a74aca4e by Berker Peksag in branch 'default': Issue #20898: Enum names are only available in the http.client module as constants. https://hg.python.org/cpython/rev/3a95a74aca4e -- ___ Python

[issue20898] Missing 507 response description

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: Good catch, thank you Martin. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20898 ___ ___ Python-bugs-list

Trees

2015-01-19 Thread Zachary Gilmartin
Why aren't there trees in the python standard library? -- https://mail.python.org/mailman/listinfo/python-list

Re: Trees

2015-01-19 Thread Ben Finney
Zachary Gilmartin zacharygilmar...@gmail.com writes: Why aren't there trees in the python standard library? What sort of answer are you looking for? There are many ways that question could be intended. If you're asking about what could be keeping a particular tree implementation out of the

[issue23276] hackcheck is broken in association with __setattr__

2015-01-19 Thread Alfred Krohmer
New submission from Alfred Krohmer: The following code: import traceback import sys from PyQt5.QtCore import Qt class MetaA(type): pass class A(metaclass=MetaA): pass class MetaB(type): pass class B(metaclass=MetaB): pass for ClassB in B, Qt: print(Trying class %s %

Re: Trees

2015-01-19 Thread Chris Angelico
On Tue, Jan 20, 2015 at 9:16 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: If you're asking because you think all data structures magically appear in the standard library by wishing it so, I think you over-estimate the powers of the standard library maintainers. Oh come on Ben. Guido has a

[issue23271] Unicode HOWTO documentation error

2015-01-19 Thread Eric V. Smith
Eric V. Smith added the comment: The example is correct. If you type it into a python interpreter, you get the results as shown in the example. The .replace() method does not modify the string s. It returns the new value. In the example, the new value is displayed, but is not assigned back to

[issue23271] Unicode HOWTO documentation error

2015-01-19 Thread Dionysis Zindros
New submission from Dionysis Zindros: In the Unicode HOTWO documentation for Python 2.x [0], there's an error in the fourth code sample under the section The Unicode Type. The code states: ``` s = u'Was ever feather so lightly blown to and fro as this multitude?' s.count('e') 5

Re: How to wow someone new to Python

2015-01-19 Thread Ned Batchelder
On 1/16/15 10:03 AM, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is.

Hashed lookups for tabular data

2015-01-19 Thread Joseph L. Casale
I have some tabular data for example 3 tuples that I need to build a container for where lookups into any one of the three fields are O(1). Does something in the base library exist, or if not is there an efficient implementation of such a container that has been implemented before I give it a go?

Re: Hashed lookups for tabular data

2015-01-19 Thread Chris Angelico
On Tue, Jan 20, 2015 at 1:13 AM, Joseph L. Casale jcas...@activenetwerx.com wrote: No surprise the data originates from a database however the data is utilized in a recursive processing loop where the user accessing the data benefits from a simplified and quick means to access it. Currently

[issue23272] Python built-in comparison problem

2015-01-19 Thread Lukáš Němec
Changes by Lukáš Němec lu.ne...@gmail.com: -- nosy: Lukáš.Němec priority: normal severity: normal status: open title: Python built-in comparison problem ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23272

[issue23272] Python built-in comparison problem

2015-01-19 Thread Lukáš Němec
Changes by Lukáš Němec lu.ne...@gmail.com: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23272 ___

[issue7665] test_urllib2 and test_ntpath fail if path contains \

2015-01-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: I reviewed the patch Serhiy. It looks good to me, You can go ahead and commit. Thanks! -- assignee: orsenthil - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7665

[issue23269] Tighten-up search loops in sets

2015-01-19 Thread Raymond Hettinger
New submission from Raymond Hettinger: First draft of patch to switch from a table[(i+j)mask] style of entry calculation to an entry++ style. The entry computation simplifies from add/shl4/and/lea to a single add16. To do this, the linear probes are limited to the length of table rather

Re: How to change the number into the same expression's string and vice versa?

2015-01-19 Thread Peter Otten
contro opinion wrote: In the python3 console: a=18 b='18' str(a) == b True int(b) == a True Now how to change a1,a2,a3 into b1,b2,b3 and vice versa? a1=0xf4 a2=0o36 a3=011 b1='0xf4' b2='0o36' b3='011' Python 3.4.0 (default, Apr 11 2014,

Re: How to change the number into the same expression's string and vice versa?

2015-01-19 Thread Jussi Piitulainen
Peter Otten writes: contro opinion wrote: Now how to change a1,a2,a3 into b1,b2,b3 and vice versa? a1=0xf4 a2=0o36 a3=011 b1='0xf4' b2='0o36' b3='011' Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux Type help, copyright, credits or license for more

[issue23269] Tighten-up search loops in sets

2015-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pitrou, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___ ___

[issue23228] Crashes when tarfile contains a symlink and unpack directory contain it too

2015-01-19 Thread Michael Vogt
Michael Vogt added the comment: Thanks SilentGhost for your feedback and sorry for my slow reply. I looked into this some more and attached a updated patch with a more complete test. It also covers a crash now that happens when there is a symlink cycle in the tar and on disk. My fix is to

[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-01-19 Thread STINNER Victor
New submission from STINNER Victor: In CPython, almost all memory allocations are protected against integer overflow with code looking like that: if (length ((PY_SSIZE_T_MAX - struct_size) / char_size - 1)) { PyErr_NoMemory(); return NULL; } new_size = (struct_size

Re: How to change the number into the same expression's string and vice versa?

2015-01-19 Thread Frank Millman
contro opinion contropin...@gmail.com wrote in message news:ca+ydq_651x0ndpw1j203wgbedtxy_mw7g0w3vh1woagr1iv...@mail.gmail.com... In the python3 console: a=18 b='18' str(a) == b True int(b) == a True Now how to change a1,a2,a3 into b1,b2,b3 and vice versa?

ANN: eGenix Talks Videos: Advanced Database Programming

2015-01-19 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix Talks Videos Advanced Database Programming This announcement is also available on our web-site for online reading:

[issue23217] help() function incorrectly captures comment preceding a nested function

2015-01-19 Thread anupama srinivas murthy
anupama srinivas murthy added the comment: In Python 2.7, the capture happens even if there is no decorator. The code: #Hey this is f def f(): return help(f) gives the output: Help on function f in module __main__: f() #Hey this is f whereas a docstring inside the function causes the

Storing dataset from Condtional FreqDist

2015-01-19 Thread Jose
Hello i have trying to store information in arff file but i has been really. Any ideas of how can i do that? with open('fileids3.txt', 'r') as f: genres=[word.strip() for word in f.next().split(',')] with open('adjectifs2.txt', 'r') as g: adj = [word.strip() for word in

[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-01-19 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- components: +Interpreter Core nosy: +serhiy.storchaka type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23270 ___

ANN: eGenix Talks Videos: Advanced Database Programming

2015-01-19 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix Talks Videos Advanced Database Programming This announcement is also available on our web-site for online reading:

Re: How to change the number into the same expression's string and vice versa?

2015-01-19 Thread Peter Otten
Jussi Piitulainen wrote: Peter Otten writes: {:o}.format(0xf4) '364' To add a prefix just put it into the format string. There's also these (in Python 3.2.3): hex(0xf4) '0xf4' D'oh! -- https://mail.python.org/mailman/listinfo/python-list

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: I'm not sure whether or not this was your intention, but your example demonstrates a misbehaving client, one that seems to expect a persistent connection from a non-persistent server. TCPServer will only serve a single request and will shutdown and close

Re: Hashed lookups for tabular data

2015-01-19 Thread Mark Lawrence
On 19/01/2015 17:09, Joseph L. Casale wrote: This is actually far simpler than I had started imagining, however the row data is duplicated. I am hacking away at an attempt with references to one copy of the row. Its kind of hard to recreate an sql like object in Python with indexes and the

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

2015-01-19 Thread Zach Welch
Zach Welch added the comment: Yes, pe-i386 and pe-x86-64 are the respective 32-bit and 64-bit object formats. Your commands seem reasonable. With gendef, I just let it create a .def file with the same name (i.e. skip the '-' and redirection); in my mind, that reinforces the association

[issue1103213] Adding the missing socket.recvall() method

2015-01-19 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone jean-p...@hybridcluster.com: -- nosy: -exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___

Re: Hashed lookups for tabular data

2015-01-19 Thread Joseph L. Casale
So presumably your data's small enough to fit into memory, right? If it isn't, going back to the database every time would be the best option. But if it is, can you simply keep three dictionaries in sync? Hi Chris, Yeah the data can fit in memory and hence the desire to avoid a trip here.

Re: How to change the number into the same expression's string and vice versa?

2015-01-19 Thread Mark Lawrence
On 19/01/2015 09:01, contro opinion wrote: In the python3 console: a=18 b='18' str(a) == b True int(b) == a True Now how to change a1,a2,a3 into b1,b2,b3 and vice versa? a1=0xf4 a2=0o36 a3=011 b1='0xf4' b2='0o36' b3='011' Giving a completely different

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: Hi Martin, Thanks for the example code. I'm not sure whether or not this was your intention, but your example demonstrates a misbehaving client, one that seems to expect a persistent connection from a non-persistent server. TCPServer will only serve a single

Re: Hashed lookups for tabular data

2015-01-19 Thread Chris Angelico
On Tue, Jan 20, 2015 at 4:09 AM, Joseph L. Casale jcas...@activenetwerx.com wrote: row = (foo, bar, quux) # there could be duplicate quuxes but not foos or bars foo_dict = {} bar_dict = {} quux_dict = collections.defaultdict(set) foo_dict[row[0]] = row bar_dict[row[1]] = row

[issue14218] include rendered output in addition to markup

2015-01-19 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14218 ___ ___ Python-bugs-list

[issue23275] Can assign [] = (), but not () = []

2015-01-19 Thread Cesar Kawakami
Changes by Cesar Kawakami cesarkawak...@gmail.com: -- nosy: +Cesar.Kawakami ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23275 ___ ___

  1   2   >