[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: > Why can’t you do the file rewinding yourself, when you retry the request? Actually I'm not retry to send a request. This behavior I met for httplib library while I'm send a single request, httplib send it to exist connection and then recreates connection on

trying to force stdout to utf-8 with errors='ignore' or 'replace'

2015-12-11 Thread Adam Funk
I'm fiddling with a program that reads articles in the news spool using email.parser (standard library) & email_reply_parser.EmailReplyParser (installed with pip). Reading is fine, & I don't get any errors writing output extracted from article bodies *until* I try to suppress invalid characters.

tox-2.3.0: bug fixes, new plugin hooks

2015-12-11 Thread holger krekel
Just released tox-2.3.0, the python test configuration and automation tool. It brings some important bug fixes and more hooks related to testenvironment creation and installation, allowing upcoming plugins like tox-debian to add extra steps during installation. I'd like to send special thanks to

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: Sorry but I have a few concerns about your patch: Why does this have to be in the HTTPConnection.send() method? Why can’t you do the file rewinding yourself, when you retry the request? This could break compatibility if someone wrote code that expects data to

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41286/Выделение_058.png ___ Python tracker ___

Pylint and Pylint's Astroid projects moved to the Python Code-Quality Authority

2015-12-11 Thread Ian Cordasco
Hi everyone! It's my pleasure to announce to you that PyLint and its Astroid library have migrated to git from mercurial and have migrated from BitBucket to the Python Code-Quality Authority (PyCQA) organization on GitHub. The new URLs are: - PyLint: https://github.com/pycqa/pylint - Astroid:

PyCA cryptography 1.1.2 released

2015-12-11 Thread Paul Kehrer
PyCA/cryptography (https://github.com/pyca/cryptography) 1.1.2 has been released. cryptography is a package which provides cryptographic recipes and primitives to Python developers. Our goal is for it to be your "cryptographic standard library". We support Python 2.6-2.7, Python 3.3+, and PyPy.

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41288/Выделение_061.png ___ Python tracker ___

Re: trying to force stdout to utf-8 with errors='ignore' or 'replace'

2015-12-11 Thread Peter Otten
Adam Funk wrote: > I'm fiddling with a program that reads articles in the news spool > using email.parser (standard library) & > email_reply_parser.EmailReplyParser (installed with pip). Reading is > fine, & I don't get any errors writing output extracted from article > bodies *until* I try to

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Changes by Mikhail Gulyaev : Added file: http://bugs.python.org/file41287/Выделение_059.png ___ Python tracker ___

Re: python script for dwonload free anything?

2015-12-11 Thread Laura Creighton
In a message of Fri, 11 Dec 2015 06:29:33 -0800, hienm...@gmail.com writes: >i want create script for download free 3d model from nonecg.com like >https://github.com/nishad/udemy-dl-windows , this script download free udemy >video lesson. Anyone can tell e, how to create script like that? >--

mush 2.0 released! - Type-based dependency injection for scripts

2015-12-11 Thread Chris Withers
Hi All, I'm very happy to announce a new release of Mush, a light weight dependency injection framework aimed at enabling the easy testing and re-use of chunks of code that make up scripts. This release is a re-write dropping all the heuristic callable ordering in favour of building up

Re: python script for dwonload free anything?

2015-12-11 Thread Mark Lawrence
On 11/12/2015 14:29, hienm...@gmail.com wrote: i want create script for download free 3d model from nonecg.com like https://github.com/nishad/udemy-dl-windows , this script download free udemy video lesson. Anyone can tell e, how to create script like that? Any (semi)decent IDE and/or

Re: Problem with sqlite3 and Decimal (fwd)

2015-12-11 Thread Frank Millman
"Igor Korot" wrote in message news:CA+FnnTyaLLEsYGU7v2BreySDOQ1rVsMzJ=5f4iQTLW3=tn=e...@mail.gmail.com... Hi, > To: python-list@python.org > From: "Frank Millman" > Subject: Problem with sqlite3 and Decimal > Date: Fri, 11 Dec 2015 11:21:53 +0200 > Lines: 71 > > Hi all >

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: This is something that comes up repeatedly on the bug tracker. There's no bug here in the complex type or the repr. What there *is* is a limitation resulting from the fact that Python doesn't have *imaginary* literals, only *complex* literals. So in: -1-0j

Re: Problem with sqlite3 and Decimal (fwd)

2015-12-11 Thread Igor Korot
Hi, Frank, On Fri, Dec 11, 2015 at 9:27 AM, Frank Millman wrote: > "Igor Korot" wrote in message > news:CA+FnnTyaLLEsYGU7v2BreySDOQ1rVsMzJ=5f4iQTLW3=tn=e...@mail.gmail.com... > >> Hi, >> >> > To: python-list@python.org >> > From: "Frank Millman" >> >

Re: Problem with sqlite3 and Decimal (fwd)

2015-12-11 Thread Igor Korot
Hi, On Fri, Dec 11, 2015 at 8:45 AM, Laura Creighton wrote: > From python-list. > Very weird. > Another reason not to use sqlite3 > > --- Forwarded Message > > To: python-list@python.org > From: "Frank Millman" > Subject: Problem with sqlite3 and Decimal

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: > As I understand the output of repr() is supposed to be something that can > evaluated to recreate the same object. Right, but that's an ideal that's not always achieved in practice. If I had my druthers, I'd 'fix' the repr of the complex object to return

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Previous discussions: #17336, #22548 -- ___ Python tracker ___ ___

[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-12-11 Thread Mojca Miklavec
Mojca Miklavec added the comment: Is anyone willing to help me a bit to come up with a pull request? I took some ideas from here: https://fossies.org/diffs/xscreensaver/5.30_vs_5.32/utils/thread_util.c-diff.html Citation from that patch: Clang 3.0 has a partial implementation of GNU

Re: Python variable assigning problems...

2015-12-11 Thread Ian Kelly
On Fri, Dec 11, 2015 at 9:10 AM, ICT Ezy wrote: > Dear All, > Very Sorry for the my mistake here. I code here with mu question ... > > My Question: > > A,B=C,D=10,11 > print(A,B,C,D) > #(10,11,10,11) --> This is OK! > > a=1; b=2 > a,b=b,a > print(a,b) > # (1,2) --> This is OK!

Re: Python variable assigning problems...

2015-12-11 Thread Ian Kelly
On Fri, Dec 11, 2015 at 9:24 AM, Robin Koch wrote: > Assigning goes from right to left: > > x,y=y,x=2,3 > > <=> > > y, x = 2, 3 > x, y = y, x > > Otherwise the assignment x, y = y, x would not make any sense, since x and y > haven't any values yet. > > And the execution

python 351x64

2015-12-11 Thread Jay Hamm
Hi I was trying to use your windows version of python 3.5.1 x64. It has a conflict with a notepad++ plugin NppFTP giving api-ms-win-crt-runtime-I1-1-0.dll error on start up. This seems pretty well documented on the web. The work around is to delete the plugin and reinstall since it borks the

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread R. David Murray
R. David Murray added the comment: This patch is definitely invalid. There is no requirement that data be seekable. Are you saying that there insufficient support in http(lib) for an application to handle this server timeout? Can you provide a program that demonstrates the problem (even

[issue25841] In FancyURLopener error in example with http address.

2015-12-11 Thread R. David Murray
Changes by R. David Murray : -- stage: -> needs patch versions: +Python 2.7 -Python 3.3, Python 3.4 ___ Python tracker ___

Re: trying to force stdout to utf-8 with errors='ignore' or 'replace'

2015-12-11 Thread Adam Funk
On 2015-12-11, Peter Otten wrote: > Adam Funk wrote: >> but with either or both of those, I get the dreaded >> "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position >> 562: ordinal not in range(128)". How can I force the output to be in >> UTF-8 & silently suppress invalid

Re: Python variable assigning problems...

2015-12-11 Thread Robin Koch
Am 11.12.2015 um 17:10 schrieb ICT Ezy: Dear All, Very Sorry for the my mistake here. I code here with mu question ... My Question: A,B=C,D=10,11 print(A,B,C,D) #(10,11,10,11) --> This is OK! a=1; b=2 a,b=b,a print(a,b) # (1,2) --> This is OK! x,y=y,x=2,3 print(x,y) # (3,2) --> Question: How

[issue25842] Installer does not set permissions correctly?

2015-12-11 Thread Laura Creighton
New submission from Laura Creighton: This in from python-list. 2 complaints. conflict with a notepad++ plugin and incorrect permissions. Date:Fri, 11 Dec 2015 16:30:32 + To: "python-l...@python.org" From:Jay Hamm Subject: python

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread leewz
New submission from leewz: Meaning: filter(False, lst) == (x for x in lst if not x) == itertools.filterfalse(None, lst) I understand that it is a very minor enhancement, and with not much benefit. I just happened to think about it, and wondered why it didn't already exist. I

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread R. David Murray
R. David Murray added the comment: I don't think it is worth adding as a special case. Itertools has it because of what itertools is (a mini-language for manipulating iterables), but the legacy filter function has no reason to grow additional special cases beyond None. (It's not even clear

Re: Python variable assigning problems...

2015-12-11 Thread ICT Ezy
Dear All, Very Sorry for the my mistake here. I code here with mu question ... My Question: A,B=C,D=10,11 print(A,B,C,D) #(10,11,10,11) --> This is OK! a=1; b=2 a,b=b,a print(a,b) # (1,2) --> This is OK! x,y=y,x=2,3 print(x,y) # (3,2) --> Question: How to explain it? # Not understand this

Re: python script for dwonload free anything?

2015-12-11 Thread hienmizu
thank you laura, but i know this paid 3d model: http://www.nonecg.com/tokyo-shibuya.html. do you know that -- https://mail.python.org/mailman/listinfo/python-list

[issue25841] In FancyURLopener error in example with http address.

2015-12-11 Thread Denis Savenko
New submission from Denis Savenko: In documentation from this page https://docs.python.org/3.5/library/urllib.request.html#examples in examples uses default address to python site with http. ( http://python.org/ ). But now python.org use https. When i try use example in ipython i get I/0

[issue24505] shutil.which wrong result on Windows

2015-12-11 Thread Toby Tobkin
Toby Tobkin added the comment: I'm working on a patch and an accompanying unit test for this now. Should have it out today. -- nosy: +tobytobkin ___ Python tracker

Can anyone help me modify the code so the ball starts in random directions

2015-12-11 Thread phamtony33
Can anyone direct me in the direction where to start the code for the randomized of the ball to start. from Tkinter import * window = Tk() canvas = Canvas(window, width=500, height=500, background="green") canvas.pack() def mouse_paddle_move(event): mouseY = event.y

[issue6478] time.tzset does not reset _strptime's locale time cache

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks Serhiy. Can we close this now? -- ___ Python tracker ___ ___

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: The equality of code objects is determined by the code_richcompare() logic in Objects/codeobject.c. Two code objects are equal if all of their attributes compare equal. That includes co_name, co_argcount, co_kwonlyargcount, co_nlocals, co_flags,

[issue5501] Update multiprocessing docs re: freeze_support

2015-12-11 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +davin ___ Python tracker ___ ___

[issue25757] Subclasses of property lose docstring

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc1aa0e88626 by Berker Peksag in branch '3.5': Issue #25755: Move PropertyWritableDoc into the test case https://hg.python.org/cpython/rev/cc1aa0e88626 New changeset 8f52c9d72d9f by Berker Peksag in branch 'default': Issue #25755: Move

[issue25755] Test test_property failed if run twice

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Nan. I've updated your patch to apply Serhiy's advice. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue25822] Add docstrings to fields of urllib.parse results

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Swati. I left a few comments on Rietveld: http://bugs.python.org/review/25822/ A test wouldn't hurt, but you can wait for further review comments to avoid updating tests each time you get a comment. -- nosy: +berker.peksag

[issue25730] invisible sidebar content with code snippets

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: This can be reproduced at https://docs.python.org/3/faq/windows.html You can find the CSS file at Doc/tools/pydoctheme/static/pydoctheme.css. You can override .highlight there, but the actual problem is that Sphinx creates the outer highlight-python3 div with

[issue25757] Subclasses of property lose docstring

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: fix_repetitions.diff was unrelated to this issue so subprop_doc_r2.diff still needs to be reviewed. -- ___ Python tracker

[issue25757] Subclasses of property lose docstring

2015-12-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks for fix_repetitions.diff, Torsten. The test_property failure was discussed in issue 25755. -- nosy: +berker.peksag ___ Python tracker

Re: Is vars() the most useless Python built-in ever?

2015-12-11 Thread Rick Johnson
On Tuesday, December 1, 2015 at 10:49:19 PM UTC-6, Ian wrote: > > It's a well know fact that GvR was inspired to create > > Python from his experiences working with a language > > called ABC -- and ABC was designed *EXCLUSIVELY* to be a > > beginners language. > Which is exactly what made ABC

Re: Is vars() the most useless Python built-in ever?

2015-12-11 Thread Rick Johnson
On Tuesday, December 1, 2015 at 1:34:54 AM UTC-6, Marko Rauhamaa wrote: > Rick Johnson : > > > python was originally created to be an easy language for noobs to > > learn > > Really? That's would be a silly objective for a programming language. > > > many a noob has been stumped > > So? > >

[issue25823] Speed-up oparg decoding on little-endian machines

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I verified that Clang and GCC both give the expected disassembly with Serhiy's patch. We ought to restrict the #if to just the compilers that are known to optimize away the memcpy. Clang (for 'BUILD_LIST_UNPACK') ---

[issue25755] Test test_property failed if run twice

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc1aa0e88626 by Berker Peksag in branch '3.5': Issue #25755: Move PropertyWritableDoc into the test case https://hg.python.org/cpython/rev/cc1aa0e88626 New changeset 8f52c9d72d9f by Berker Peksag in branch 'default': Issue #25755: Move

[issue25757] Subclasses of property lose docstring

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can this be closed now or is there work left to be done? -- nosy: +rhettinger ___ Python tracker ___

[issue25768] compileall functions do not document or test return values

2015-12-11 Thread Brett Cannon
Brett Cannon added the comment: Do the tests take much longer with all of the added stuff in setUp()/tearDown()? It's just that all of it has to run for all tests. You could make a mixin or put all of it in a method that you selectively call and which registers the proper cleanup method. As

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: As far as I understand, httplib should not be automatically reconnecting and re-sending requests. I still suspect your script may be causing the retry, but you are welcome to prove me wrong. Can you clarify “send PUT request to closed socket”: is the local OS

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread Martin Panter
Martin Panter added the comment: History is good for understanding how things became the way they are. :) Thanks Alexander and Random! -- nosy: +martin.panter resolution: -> fixed stage: -> resolved status: open -> closed type: -> enhancement versions: +Python 3.5, Python 3.6

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here's another variant (courtesy of Nick Coghlan): python3.5 -c "seq1 = [1.0 for x in range(5)]; seq2 = [True for x in range(5)]; print(seq1); print(seq2)" -- ___ Python tracker

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread Kevin Shweh
Kevin Shweh added the comment: A type-based check runs into problems with 0.0 vs -0.0. For example, on Python 2.7.11: >>> x, y = lambda: 0.0, lambda: -0.0 >>> y() 0.0 I wasn't able to reproduce the -0.0 problem with Python 3.4 on Ideone; y.__code__.co_consts seems to have an unused 0.0 in it

[issue25841] In FancyURLopener error in example with http address.

2015-12-11 Thread Martin Panter
Martin Panter added the comment: Assuming you meant http://www.python.org/ (added the www), I cannot produce any error with any example that requests directly to the site. The “http:” server already redirects to “https:”, so there is no problem. Obviously the examples that depend on made-up

[issue25844] Pylauncher, launcher.c: Assigning NULL to a pointer instead of testing against NULL

2015-12-11 Thread Alexander Riccio
New submission from Alexander Riccio: I found this while writing up a separate bug (CPython doesn't use static analysis!). In PC/launcher.c, get_env has a bug: /* Large environment variable. Accept some leakage */ wchar_t *buf2 = (wchar_t*)malloc(sizeof(wchar_t) * (result+1));

[issue25844] Pylauncher, launcher.c: Assigning NULL to a pointer instead of testing against NULL

2015-12-11 Thread Alexander Riccio
Changes by Alexander Riccio : -- type: -> crash ___ Python tracker ___ ___

[issue25846] Use of Py_ARRAY_LENGTH on pointer in posixmodule.c, win32_wchdir

2015-12-11 Thread Alexander Riccio
New submission from Alexander Riccio: I found this while writing up a separate bug (CPython doesn't use static analysis!). In modules/posixmodule.c, win32_wchdir uses Py_ARRAY_LENGTH on a wchar_t*: wchar_t _new_path[MAX_PATH], *new_path = _new_path; int result; wchar_t env[4] =

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread random832
random832 added the comment: Looks like a result of searching and replacing PyInt with PyLong - the diff can be found here, if anyone cares. https://hg.python.org/cpython-fullhistory/rev/f324631462a2. Oddly, there was _another, older_ revision that fixed this correctly:

[issue25822] Add docstrings to fields of urllib.parse results

2015-12-11 Thread Martin Panter
Martin Panter added the comment: [padding] I left some comments. I wonder if the doc strings are too specific when they mention “request”, “file”, “download”, “page”, etc. Maybe these could just be examples of what the fields are used for (e.g. “The hierarchical path, such as the path to a

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread R. David Murray
R. David Murray added the comment: The issue is definitely in httplib2, then. You should open an issue on their bug tracker. -- resolution: -> third party stage: test needed -> resolved status: open -> closed ___ Python tracker

Re: Is vars() the most useless Python built-in ever?

2015-12-11 Thread Steven D'Aprano
On Sat, 12 Dec 2015 09:13 am, Rick Johnson wrote: > Intuitiveness and productivity have a > synergy like peas and carrots! One cannot be productive if one is fighting > an unintuitive interface. Could you drive with your toes? How about your > tongue? Drive a car with my tongue? Perhaps not, but

Re: Problem with sqlite3 and Decimal (fwd)

2015-12-11 Thread Frank Millman
"Igor Korot" wrote in message news:CA+FnnTyZY_1=62rbk_kkz39tkeoa6jvmfn9qs17as-2yd4d...@mail.gmail.com... Yes, I saw your post to sqlite3 ML. And I do know that by default sqlite3 does not have many types supported. However, all you need to do is save it as DECIMAL(10,2). It is supported is

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: Thanks for attention -- ___ Python tracker ___ ___ Python-bugs-list

[issue19771] runpy should check ImportError.name before wrapping it

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 850cc65ceda4 by Martin Panter in branch '3.5': Issue #19771: Omit irrelevant message if package could not be initialized https://hg.python.org/cpython/rev/850cc65ceda4 New changeset 323c10701e5d by Martin Panter in branch 'default': Issue #19771:

[issue25809] "Invalid" tests on locales

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f24a6dc934b by Martin Panter in branch '3.5': Issue #25809: Skip testing platform-dependent French thousands separator https://hg.python.org/cpython/rev/4f24a6dc934b New changeset 7c5c03143923 by Martin Panter in branch 'default': Issue #25809:

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26859a7e385c by Martin Panter in branch '3.5': Issue #25845: Drop redundant checks leftover from int to long conversion https://hg.python.org/cpython/rev/26859a7e385c New changeset 9be59ad8af80 by Martin Panter in branch 'default': Issue #25845:

[issue19771] runpy should check ImportError.name before wrapping it

2015-12-11 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Mikhail Gulyaev
Mikhail Gulyaev added the comment: You right I found who resend requests! My request is goes through httplb2(which use httplib and resends request on failure), but the issue is that if request body contains file and then that file is read out and on retry there is nothing to read since we

Re: Is vars() the most useless Python built-in ever?

2015-12-11 Thread Chris Angelico
On Sat, Dec 12, 2015 at 3:44 PM, Steven D'Aprano wrote: > On Sat, 12 Dec 2015 09:13 am, Rick Johnson wrote: > >> Intuitiveness and productivity have a >> synergy like peas and carrots! One cannot be productive if one is fighting >> an unintuitive interface. Could you drive

[issue19771] runpy should check ImportError.name before wrapping it

2015-12-11 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> commit review ___ Python tracker ___

[issue25845] _ctypes\cfield.c identical subexpressions in Z_set

2015-12-11 Thread Alexander Riccio
New submission from Alexander Riccio: I found this while writing up a separate bug (CPython doesn't use static analysis!). In _ctypes/cfield.c, Z_set has a bug of some sort: if (PyLong_Check(value) || PyLong_Check(value)) { See:

Re: Problem with sqlite3 and Decimal

2015-12-11 Thread Frank Millman
"Frank Millman" wrote in message news:n4ei3l$b98$1...@ger.gmane.org... I need to store Decimal objects in a sqlite3 database, using Python 3.4 on Windows 7. I followed the instructions here - http://stackoverflow.com/questions/6319409/how-to-convert-python-decimal-to-sqlite-numeric It

Re: Can anyone help me modify the code so the ball starts in random directions

2015-12-11 Thread phamtony33
On Friday, December 11, 2015 at 7:55:59 PM UTC-5, Steven D'Aprano wrote: > On Sat, 12 Dec 2015 10:19 am, phamton...@gmail.com wrote: > > > Can anyone direct me in the direction where to start the code for the > > randomized of the ball to start. > > [...] > > move_ball(-10, 7, 0) > > > That

Re: Can anyone help me modify the code so the ball starts in random directions

2015-12-11 Thread Erik
Hi, On 11/12/15 23:19, phamton...@gmail.com wrote: Can anyone direct me in the direction where to start the code for the randomized of the ball to start. Your questions over the last week or so appear to be homework assignments. However, I'll give you a hint: in the interactive

Re: Can anyone help me modify the code so the ball starts in random directions

2015-12-11 Thread Erik
Hi, On 11/12/15 23:19, phamton...@gmail.com wrote: Can anyone direct me in the direction where to start the code for the randomized of the ball to start. Your questions over the last week or so appear to be homework assignments. However, I'll give you a hint: in the interactive

[issue25843] lambdas on the same line may incorrectly share code objects

2015-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: One possible solution for all these variants is to let code objects track both the co.firstlineno and co.firstrowno. -- ___ Python tracker

Re: Problem with sqlite3 and Decimal

2015-12-11 Thread Chris Angelico
On Sat, Dec 12, 2015 at 4:10 PM, Frank Millman wrote: > I can reproduce your example above. However, if I set the initial value to > 5678.7, then the sequence goes > > 5678.7 > 5802.15 > 5925.6 > 6049.05 > 6172.5 > > I would have thought that adding 123.45 to 5802.15 would

[issue25838] Lib/httplib.py: Resend http request on server close connection

2015-12-11 Thread Martin Panter
Martin Panter added the comment: Okay that makes a lot more sense! I agree that this should either be fixed in httplib2 or in your own script. The problem parallels Issue 5038, where urlopen() is used (rather than httplib2), and the request is retried after getting an authorization failure

Re: Problem with sqlite3 and Decimal

2015-12-11 Thread Chris Angelico
IOn Sat, Dec 12, 2015 at 6:31 PM, Frank Millman wrote: > I have found a workaround for my problem, but first I needed to understand > what was going on more clearly. This is what I have figured out. > > 1. The solution in the SO article is a bit of sleight of hand, though very

Re: Can anyone help me modify the code so the ball starts in random directions

2015-12-11 Thread Steven D'Aprano
On Sat, 12 Dec 2015 10:19 am, phamton...@gmail.com wrote: > Can anyone direct me in the direction where to start the code for the > randomized of the ball to start. [...] > move_ball(-10, 7, 0) That starts the ball moving, with x-speed of -10 and y-speed of 7. Instead use something similar

[issue25822] Add docstrings to fields of urllib.parse results

2015-12-11 Thread Swati Jaiswal
Changes by Swati Jaiswal : Added file: http://bugs.python.org/file41290/iss_25822_2.patch ___ Python tracker ___

[issue25829] Mixing multiprocessing pool and subprocess may create zombie process, and cause program to hang.

2015-12-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: I wouldn't _assume_ that there was a good design reason for that in multiprocessing... it already mixed threads and fork() without realizing that you cannot safely do that. -- nosy: +gregory.p.smith -gps ___

[issue25847] CPython not using Visual Studio code analysis!

2015-12-11 Thread Alexander Riccio
New submission from Alexander Riccio: Visual Studio comes with static analysis, enabled by /analyze (command line) or "Code analysis" in the project configuration dialog. Currently, none of the CPython projects in PCbuild have Code Analysis turned on, in any configuration. I was going to

[issue25809] "Invalid" tests on locales

2015-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 903a2664d32d by Martin Panter in branch '2.7': Issue #25809: Skip testing platform-dependent French thousands separator https://hg.python.org/cpython/rev/903a2664d32d -- ___ Python tracker

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread Emanuel Barry
Emanuel Barry added the comment: Do you mean like 'filter(None, lst)' does? -- nosy: +ebarry ___ Python tracker ___

Re: SystemError in python 2.5.4

2015-12-11 Thread Steven D'Aprano
On Thu, 10 Dec 2015 10:29 pm, Palpandi wrote: > Hi All, > > I am getting the error mentioned below in python 2.5.4. > > SystemError: \loewis\25\python\Objects\longobject.c:225: bad argument to > internal function. Sounds like your installation of Python is broken. You should never get an

[issue25711] Rewrite zipimport from scratch

2015-12-11 Thread STINNER Victor
STINNER Victor added the comment: Can you both publish your WIP work? -- nosy: +haypo ___ Python tracker ___

[issue25809] "Invalid" tests on locales

2015-12-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Same here. Thanks Martin. -- ___ Python tracker ___ ___

Re: SystemError in python 2.5.4

2015-12-11 Thread dieter
Palpandi writes: > I am getting the error mentioned below in python 2.5.4. > > SystemError: \loewis\25\python\Objects\longobject.c:225: bad argument to > internal function. > > I also ran the same code in python 2.7. > There I am not getting this error. > > I don't know

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Lundeberg
New submission from Mark Lundeberg: Although -0.0 and +0.0 compare as equal using the == operator, they are distinct floating point numbers and in some cases behave differently. (See more information on the wikipedia article "Signed zero".) The distinction between +0.0 and -0.0 is most

Re: How to use internal python c funtions, from python code

2015-12-11 Thread dieter
srinivas devaki writes: > but still I think it would be cool to be able to access internal c > functions without any fuss. I can use such feature with heapq too(sift > operations), Have a look at "Cython". It is a compiler which compiles a language similar to Python

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread STINNER Victor
STINNER Victor added the comment: You should use complex(a, b) to have a reliable behaviour. Python parse doesn't see "-1-0j" as a complex literal, but as (-1)-(0j): int-complex. Example with the AST output: >>> ast.dump(ast.parse('-1-0j'))

[issue25839] negative zero components are ignored in complex number literals

2015-12-11 Thread Mark Lundeberg
Mark Lundeberg added the comment: Good point, it is doing (int-complex), observe also the following pecularities: >>> -0 - 0j 0j >>> -0. - 0j (-0+0j) >>> -0j -0j >>> 0-0j 0j >>> -(0j) (-0-0j) >>> 0.+(-0j) 0j Does this mean the bug is in repr() ? As I understand the output of repr() is

[issue25840] Allow `False` to be passed to `filter`

2015-12-11 Thread leewz
leewz added the comment: ebarry, note that `filter(None, lst)` is equivalent to `filter(bool, lst)`, which is the opposite of `filterfalse(None, lst)`. (Though `filter(True, lst) == filter(bool, lst)` would be a parallel.) -- ___ Python tracker

[issue25843] unexpected output using pythons ternary operator in combination with lambda

2015-12-11 Thread Tijs Van Oevelen
Tijs Van Oevelen added the comment: Apologies for not posting a summary of the bug. I really had no idea how to describe the problem, as it is over my head. I could only refer to my question on Stack Overflow that triggered the discovery of the bug. --

[issue25842] Installer does not set permissions correctly?

2015-12-11 Thread Zachary Ware
Zachary Ware added the comment: Right, I should have been more specific here. Sorry about that. -- ___ Python tracker ___

[issue25843] unexpected output using pythons ternary operator in combination with lambda

2015-12-11 Thread Tijs Van Oevelen
Tijs Van Oevelen added the comment: It's definitely also in 3.4 by the way. -- versions: +Python 3.4 ___ Python tracker ___

Re: python 351x64

2015-12-11 Thread Ian Kelly
On Fri, Dec 11, 2015 at 9:30 AM, Jay Hamm wrote: > Hi > > I was trying to use your windows version of python 3.5.1 x64. > > It has a conflict with a notepad++ plugin NppFTP giving > api-ms-win-crt-runtime-I1-1-0.dll error on start up. > > This seems pretty well documented on

wrappers for C/C++

2015-12-11 Thread Ginga, Dick
I have inherited a product build that uses SWIG to product wrapper libraries for our C/C++ code. It currently builds these wrappers for 2.5, 2.6, 3.1 and 3.2. Is it necessary to have version specific wrappers? -- https://mail.python.org/mailman/listinfo/python-list

  1   2   >