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

2015-01-24 Thread Steve Dower
Steve Dower added the comment: It looks like #1088716 is where the change was made a bit over 10 years ago. Adding Paul to see if he has any further insight, but I'm pretty sure at that point there was no 64-bit Python (there certainly wasn't a 64-bit Windows that people were using), and

[issue23253] Delay-load ShellExecute

2015-01-24 Thread Steve Dower
Steve Dower added the comment: I assume you're referring to normal_startup and startup_nosite in perf.py at h.p.o/benchmarks? Handy to know about (I need to explore our top-level repos more often, obviously), but probably still not going to measure time in the Windows PE loader as accurately

Re: Python is DOOMED! Again!

2015-01-24 Thread Steven D'Aprano
Chris Angelico wrote: On Sun, Jan 25, 2015 at 3:00 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Mark Lawrence wrote: On 24/01/2015 06:35, Steven D'Aprano wrote: Obviously I'm not a fanatic. If I'm working out my share of a $37 meal split three ways, I just do 37/3 the

[issue23257] Update Windows build/setup instructions in devguide

2015-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 41d2d182c260 by Steve Dower in branch 'default': Issue 23257: Update Windows build/setup instructions. https://hg.python.org/devguide/rev/41d2d182c260 -- nosy: +python-dev ___ Python tracker

[issue23257] Update Windows build/setup instructions in devguide

2015-01-24 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23257 ___

[issue23311] Update PC/example_nt and extending/windows.rst

2015-01-24 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23311 ___ ___

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-24 Thread Fetchinson .
On 1/24/15, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Fetchinson . wrote: On 1/23/15, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: [...] Cobra is especially close to Python-like syntax, and supports unit tests as well: def sqroot(i as int) as float

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

2015-01-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Sat, Jan 24, 2015, at 16:00, Senthil Kumaran wrote: Senthil Kumaran added the comment: Fixed in 2.7. Other versions do not have this bug. Thank you! Would porting the tests be useful, though? -- ___

Re: __bases__ misleading error message

2015-01-24 Thread Mario Figueiredo
In article mailman.18099.1422135976.18130.python-l...@python.org, ian.g.ke...@gmail.com says... On Sat, Jan 24, 2015 at 2:14 PM, Mario Figueiredo mar...@gmail.com wrote: But that begs the OT question: No, it doesnt. http://en.wikipedia.org/wiki/Begging_the_question Cute. I'm not sure

Re: __bases__ misleading error message

2015-01-24 Thread Marco Buttu
On 24/01/2015 13:43, Steven D'Aprano wrote: Mario Figueiredo wrote: class Sub: pass foo = Sub() Sub.__bases__ foo.__bases__ The last statement originates the following error: AttributeError: 'Sub' object has no attribute

Re: __bases__ misleading error message

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 9:09 AM, Mario Figueiredo mar...@gmail.com wrote: Meaning the interpreter knows a variable's name. Which would allow it to produce an error message such as: AttributeError: 'foo' object has no attribute '__bases__' For the following code: class Sub:

Re: Python is DOOMED! Again!

2015-01-24 Thread Mario Figueiredo
In article 54c2299d$0$13005$c3e8da3$54964...@news.astraweb.com, steve+comp.lang.pyt...@pearwood.info says... I don't think that a raise of 0.10001 (10%), 0.035003 (3.5%) or 0.070007 (7%) is quite what people intended. (Don't use binary floating point

pysftp connection not sending files, hanging on 'put'

2015-01-24 Thread Jules Stevenson
Hi List, I'm trying to send some files via pysftp, authentication seems fine, but actually putting the file results in it hanging, doing nothing. The files are small (200kb) so I don't believe it's an upload issue (internet access is fine). Eventually the connection times out. Code: if

[issue23311] Update PC/example_nt and extending/windows.rst

2015-01-24 Thread Steve Dower
Steve Dower added the comment: This is probably also a good place to refer to the changes in #22980 and how they can help when building extensions outside of distutils. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23311

[issue23260] Update Windows installer

2015-01-24 Thread Steve Dower
Steve Dower added the comment: Updated patch, and hopefully it will make it into review this time. I deliberately excluded the image for the using/windows.rst documentation but you can see it at http://imgur.com/CdQaBmp -- Added file: http://bugs.python.org/file37838/23260_3.diff

[issue23292] Enum doc suggestion

2015-01-24 Thread Eli Bendersky
Eli Bendersky added the comment: Georg, each library writer is entitled to do whatever she wants. Naturally, we can't prevent dumping contents of enums into the module namespaces, and yes, backwards compatibility makes sense for some modules. However, that's tangential to *encouraging* this

Re: __bases__ misleading error message

2015-01-24 Thread Mario Figueiredo
In article mailman.18093.1422127493.18130.python-l...@python.org, tjre...@udel.edu says... AttributeError: 'Sub' object has no attribute '__bases__' In this message, 'Sub' is an adjective, modifying 'object, not naming it. If you attend to the last line of the traceback My

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

2015-01-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: Would porting the tests be useful, though? Yes, it will be useful to port the tests to 3.4 and default branch. I will do that. -- status: closed - open ___ Python tracker rep...@bugs.python.org

Re: __bases__ misleading error message

2015-01-24 Thread Terry Reedy
On 1/24/2015 5:16 AM, Mario Figueiredo wrote: Consider the following code at your REPL of choice class Sub: pass foo = Sub() Sub.__bases__ foo.__bases__ The last statement originates the following error: This is an anomalous situation.

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 4:37 AM, Paul Rubin no.email@nospam.invalid wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: versus any other decorator, but the STRING: @typehint(...) being used where a decorator would normally be expected. I didn't catch that either. I think if

Re: __bases__ misleading error message

2015-01-24 Thread Ian Kelly
On Sat, Jan 24, 2015 at 2:14 PM, Mario Figueiredo mar...@gmail.com wrote: In article 54c39366$0$13006$c3e8da3$54964...@news.astraweb.com, steve+comp.lang.pyt...@pearwood.info says... AttributeError: 'Sub' instance has no attribute '__bases__', AttributeError: 'foo' object has

Re: __bases__ misleading error message

2015-01-24 Thread Terry Reedy
On 1/24/2015 4:14 PM, Mario Figueiredo wrote: In article 54c39366$0$13006$c3e8da3$54964...@news.astraweb.com, steve+comp.lang.pyt...@pearwood.info says... AttributeError: 'Sub' instance has no attribute '__bases__', AttributeError: 'foo' object has no attribute '__bases__'

Re: __bases__ misleading error message

2015-01-24 Thread Mario Figueiredo
In article mailman.18102.1422136703.18130.python-l...@python.org, tjre...@udel.edu says... __main__ from module import a_name A module is a namespace associating names with objects. This statememt says to import the a_name to object association from module and add it to

Re: Python is DOOMED! Again!

2015-01-24 Thread Tim Chase
On 2015-01-25 04:31, Steven D'Aprano wrote: Of course we don't have $1/3 dollar coins, but I do have a pair of tin-snips and can easily cut a $1 coin into three equal pieces. I'm impressed that you can use tin-snips to cut it into exactly three equal pieces with greater precision than the

Re: Alternative to multi-line lambdas: Assign-anywhere def statements

2015-01-24 Thread Ethan Furman
On 01/23/2015 10:28 PM, Chris Angelico wrote: cmd = {} def command(func): cmd[func.__name__] = func return func @command def foo(*args): print(You asked to foo.) but this is hardly generic. There's no convenient way to give an argument to a decorator that says please

Re: Alternative to multi-line lambdas: Assign-anywhere def statements

2015-01-24 Thread Devin Jeanpierre
On Sat, Jan 24, 2015 at 11:55 AM, Chris Angelico ros...@gmail.com wrote: That's still only able to assign to a key of a dictionary, using the function name. There's no way to represent fully arbitrary assignment in Python - normally, you can assign to a name, an attribute, a subscripted item,

Re: __bases__ misleading error message

2015-01-24 Thread Marco Buttu
On 24/01/2015 20:24, Terry Reedy wrote: On 1/24/2015 5:16 AM, Mario Figueiredo wrote: Consider the following code at your REPL of choice class Sub: pass foo = Sub() Sub.__bases__ foo.__bases__ The last statement originates the following error:

Re: __bases__ misleading error message

2015-01-24 Thread Ian Kelly
On Sat, Jan 24, 2015 at 3:02 PM, Mario Figueiredo mar...@gmail.com wrote: In article mailman.18102.1422136703.18130.python-l...@python.org, tjre...@udel.edu says... __main__ from module import a_name A module is a namespace associating names with objects. This statememt says

Delegation in Python

2015-01-24 Thread Brian Gladman
I would appreciate advice on how to set up delgation in Python. I am continuously implementing a function to test whether a Python Fraction is an integer so I wanted to define a new class, based on Fraction, that includes this new method. But I am not clear on how to delegate from my new class

Re: __bases__ misleading error message

2015-01-24 Thread Mario Figueiredo
In article mailman.18105.1422139063.18130.python-l...@python.org, ros...@gmail.com says... Awesome! I'm always a bit wary of analogies... sometimes they're really helpful, other times they're unhelpful and confusing. Yeah. Your's was all it took :) The thing with analogies is to never take

Re: Alternative to multi-line lambdas: Assign-anywhere def statements

2015-01-24 Thread Yawar Amin
Hi, On Saturday, January 24, 2015 at 3:36:04 PM UTC-5, Devin Jeanpierre wrote: [...] Obviously, nobody will be happy until you can do: def call(*a, **kw): return lambda f: f(*a, **kw) @call() def x, y (): yield 1 yield 2 Actually, maybe not even then. You're probably right,

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-24 Thread Paul Rubin
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: versus any other decorator, but the STRING: @typehint(...) being used where a decorator would normally be expected. I didn't catch that either. I think if hints are to go in decorators, then it's best to extend the decorator

[issue23312] google thinks the docs are mobile unfriendly

2015-01-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +georg.brandl, serhiy.storchaka versions: -Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23312 ___

[issue23292] Enum doc suggestion

2015-01-24 Thread Georg Brandl
Georg Brandl added the comment: Likewise, I don't feel strongly that it *should* go in, but I wouldn't object to it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23292 ___

[issue23312] google thinks the docs are mobile unfriendly

2015-01-24 Thread Georg Brandl
Georg Brandl added the comment: Yes, the theme is anything but responsive. If someone already knows how to do this, please step forward. I guess it's not too hard to move the sidebar to the top/bottom on mobile, and adapt the font sizes. -- ___

Re: Alternative to multi-line lambdas: Assign-anywhere def statements

2015-01-24 Thread MRAB
On 2015-01-24 19:55, Chris Angelico wrote: On Sun, Jan 25, 2015 at 5:56 AM, Ethan Furman et...@stoneleaf.us wrote: If the non-generic is what you're concerned about: # not tested dispatch_table_a = {} dispatch_table_b = {} dispatch_table_c = {} class dispatch: def __init__(self,

Re: __bases__ misleading error message

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 9:33 AM, Mario Figueiredo mar...@gmail.com wrote: In article mailman.18104.1422138354.18130.python-l...@python.org, ros...@gmail.com says... Let me explain by way of analogy. [snipped] Gotcha! Thanks for the explanation :) Awesome! I'm always a bit wary of

Re: __bases__ misleading error message

2015-01-24 Thread Mario Figueiredo
In article mailman.18103.1422137849.18130.python-l...@python.org, ian.g.ke...@gmail.com says... No, you're being told that the *object* doesn't know the names of the variables that it's bound to. In the context above, the variable is right there under that name in the globals dict, as can be

[issue23253] Delay-load ShellExecute

2015-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5bff604a864e by Steve Dower in branch 'default': Closes #23253: Delay-load ShellExecute https://hg.python.org/cpython/rev/5bff604a864e -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open - closed

[issue23312] google thinks the docs are mobile unfriendly

2015-01-24 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23312 ___ ___

Re: Alternative to multi-line lambdas: Assign-anywhere def statements

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 5:56 AM, Ethan Furman et...@stoneleaf.us wrote: If the non-generic is what you're concerned about: # not tested dispatch_table_a = {} dispatch_table_b = {} dispatch_table_c = {} class dispatch: def __init__(self, dispatch_table): self.dispatch =

Re: Python is DOOMED! Again!

2015-01-24 Thread Ian Kelly
On Sat, Jan 24, 2015 at 2:14 PM, alister alister.nospam.w...@ntlworld.com wrote: Either that, or make up change with 20¢, 10¢ and 5¢ (we practice round-to-nearest-5-cents here). I suppose if you all pay 35¢ it at least gives the waitress a tip. In the Pacific States they have made a bolder

Re: Python is DOOMED! Again!

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 3:00 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Mark Lawrence wrote: On 24/01/2015 06:35, Steven D'Aprano wrote: Obviously I'm not a fanatic. If I'm working out my share of a $37 meal split three ways, I just do 37/3 the same as anyone else :-)

Re: Python Sanity Proposal: Type Hinting Solution

2015-01-24 Thread Rick Johnson
On Saturday, January 24, 2015 at 7:30:02 AM UTC-6, Steven D'Aprano wrote: [...] It requires extra complexity to the parser, so that decorators may be separated from the function by a hint: @decorate @typehint: (str, int) - bool def myfunction(arg1, arg2): No doubt some people will get

[issue21408] delegation of `!=` to the right-hand side argument is not always done

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are few incorrect implementations of __ne__ in the stdlib. Updated patch removes them. May be we should remove all implementations of __ne__ which are redundant now. -- Added file: http://bugs.python.org/file37837/method-not-operator-2.patch

[issue23310] MagicMock constructor configuration fails for magic methods

2015-01-24 Thread berdario
New submission from berdario: I guess this should be expected... too much magic :P from unittest.mock import MagicMock MagicMock(**{'__hash__.return_value': FIXME}) Traceback (most recent call last): File stdin, line 1, in module File

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

2015-01-24 Thread Paul Moore
Paul Moore added the comment: There's a lot of politics around the mingw vs mingw64 situation, but in practice I believe the various mingw64 builds are fine. So I see no reason not to supply a correct 64-bit libpythonXY.a. When the patch was made to include the libpythonXY.a file to the msi

Re: Python is DOOMED! Again!

2015-01-24 Thread alister
Of course we don't have $1/3 dollar coins, but I do have a pair of tin-snips and can easily cut a $1 coin into three equal pieces. wow you have just given a physical demonstration of integer Maths $1 /3 =$0 as the coin is now worthless ;-) Either that, or make up change with 20¢, 10¢ and

Re: __bases__ misleading error message

2015-01-24 Thread Mario Figueiredo
In article 54c39366$0$13006$c3e8da3$54964...@news.astraweb.com, steve+comp.lang.pyt...@pearwood.info says... AttributeError: 'Sub' instance has no attribute '__bases__', AttributeError: 'foo' object has no attribute '__bases__' The first would be nice. The second is

[issue23119] Remove unicode specialization from set objects

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be add the unicode specialization right in PyObject_RichCompareBool? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 24/01/2015 23:43, Chris Angelico wrote: On Sun, Jan 25, 2015 at 10:38 AM, Brian Gladman no...@nowhere.net wrote: On 24/01/2015 23:22, Chris Angelico wrote: class RF(Fraction): def is_integer(self): return self.numerator % self.denominator == 0 Thanks for your help on this. I

Re: Delegation in Python

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 11:18 AM, Brian Gladman no...@nowhere.net wrote: Is there a way of doing delegation rather than sub-classing? That is, can I create a class (say RF) that passes some of its methods to Fraction for implementation but always returns an RF? Hmm. The key here is that you

[issue21548] pydoc -k IndexError on empty docstring

2015-01-24 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch with tests. -- nosy: +berker.peksag stage: - patch review Added file: http://bugs.python.org/file37841/issue21548.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548

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

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Updated v2 patch. This version avoids intruding into the HTTPConnection.connect() implementation, so that users, tests, etc may still set the undocumented “sock” attribute without calling the base connect() method. Also code style changes based on feedback to

[issue23232] 'codecs' module functionality + its docs -- concerning custom codecs, especially non-string ones

2015-01-24 Thread Martin Panter
Martin Panter added the comment: I am certainly no expert, but this is how I understand the three different kinds of codecs are used: * Stateless codecs: str.encode(), bytes.decode(), etc * Incremental codecs: TextIOWrapper, IncrementalNewlineDecoder * Stream codecs: only stuff inside the

Re: Hello World in Python

2015-01-24 Thread Terry Reedy
On 1/24/2015 6:53 PM, Christopher J. Pisz wrote: I am trying to help a buddy out. I am a C++ on Windows guy. This buddy of mine is learning Python at work on a Mac. I figured I could contribute with non language specific questions and such. When learning any new language, I said, the first step

Re: Python simple Code

2015-01-24 Thread Terry Reedy
On 1/24/2015 7:16 PM, Salem Alqahtani wrote: Hi Guys, I just joined the group and I hope that I can help and be active. I have a question about python. I wrote a code on python 2.7 and I want to choose from the list of names that I provide n!. I execute the code but the result or output is

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

2015-01-24 Thread Berker Peksag
Berker Peksag added the comment: +self.assertDictEqual(self.conn._tunnel_headers, tunnel_headers) You could just use assertEqual. Quoting from docs: The list of type-specific methods automatically used by assertEqual() are summarized in the following table. Note that it’s usually

Re: Delegation in Python

2015-01-24 Thread Terry Reedy
On 1/24/2015 5:57 PM, Brian Gladman wrote: I would appreciate advice on how to set up delgation in Python. I am continuously implementing a function to test whether a Python Fraction is an integer Since Fractions are reduced to lowest terms, from fractions import Fraction as F F(4, 2)

Re: Alternative to multi-line lambdas: Assign-anywhere def statements

2015-01-24 Thread Ethan Furman
On 01/24/2015 11:55 AM, Chris Angelico wrote: On Sun, Jan 25, 2015 at 5:56 AM, Ethan Furman et...@stoneleaf.us wrote: If the non-generic is what you're concerned about: # not tested dispatch_table_a = {} dispatch_table_b = {} dispatch_table_c = {} class dispatch: def __init__(self,

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-24 Thread Rick Johnson
On Thursday, January 22, 2015 at 4:26:29 PM UTC-6, Christian Gollwitzer wrote: Well, it turns out you actually can. We don't have Guido's time machine, but still there is a configuration option in Tk, albeit a very obscure one: you have to set the global Tcl variables tcl_wordchars and

Re: Benchmarking some modules - strange result

2015-01-24 Thread Dan Stromberg
On Sat, Jan 24, 2015 at 6:37 PM, Chris Angelico ros...@gmail.com wrote: On Sun, Jan 25, 2015 at 1:36 PM, Dan Stromberg drsali...@gmail.com wrote: On Sat, Jan 24, 2015 at 6:24 PM, Chris Angelico ros...@gmail.com wrote: On Sun, Jan 25, 2015 at 1:11 PM, Dan Stromberg drsali...@gmail.com wrote:

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

2015-01-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: Committed the test changes in fcab9c106f2f (3.4) and a858cde113f2 (3.5) -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___

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

2015-01-24 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the patch Martin (as well as catching a couple issues that I'd run into recently as well). I've left a couple comments up on Rietveld. -- ___ Python tracker rep...@bugs.python.org

Re: Hello World in Python

2015-01-24 Thread Rustom Mody
On Sunday, January 25, 2015 at 5:36:02 AM UTC+5:30, Chris Angelico wrote: One thing that I really like doing with my Python students (full disclosure: I'm a mentor with www.thinkful.com and am thus at times paid to help people learn Python) is some form of screen-sharing, so I can watch

Re: Hello World in Python

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 6:14 PM, Rustom Mody rustompm...@gmail.com wrote: On Sunday, January 25, 2015 at 5:36:02 AM UTC+5:30, Chris Angelico wrote: One thing that I really like doing with my Python students (full disclosure: I'm a mentor with www.thinkful.com and am thus at times paid to help

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-24 Thread Ent
Ent added the comment: Based on the comments of many good netizens, I have further updated the patch. -- Added file: http://bugs.python.org/file37849/jan25.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 25/01/2015 01:31, Terry Reedy wrote: On 1/24/2015 5:57 PM, Brian Gladman wrote: I would appreciate advice on how to set up delgation in Python. I am continuously implementing a function to test whether a Python Fraction is an integer Since Fractions are reduced to lowest terms, from

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 25/01/2015 00:28, Chris Angelico wrote: On Sun, Jan 25, 2015 at 11:18 AM, Brian Gladman no...@nowhere.net wrote: Is there a way of doing delegation rather than sub-classing? That is, can I create a class (say RF) that passes some of its methods to Fraction for implementation but always

Re: Python is DOOMED! Again!

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 10:20 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: Besides, why does he need *ME* to lick his boots when he already has plenty of fan-boys over at python-ideas and python-dev lining up. This community is *NOT*, and should never be, a homogeneous block -- for we

Re: Python is DOOMED! Again!

2015-01-24 Thread Mario Figueiredo
In article mailman.18107.1422142244.18130.python-l...@python.org, ros...@gmail.com says... On Sun, Jan 25, 2015 at 10:20 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: Besides, why does he need *ME* to lick his boots when he already has plenty of fan-boys over at python-ideas and

Re: Delegation in Python

2015-01-24 Thread Gary Herron
On 01/24/2015 03:22 PM, Chris Angelico wrote: On Sun, Jan 25, 2015 at 9:57 AM, Brian Gladman no...@nowhere.net wrote: But I am not clear on how to delegate from my new class to the existing Fraction class. This is what I have: -- class RF(Fraction): def

[issue23314] Disabling CRT asserts in debug build

2015-01-24 Thread Steve Dower
New submission from Steve Dower: When we completely switch Windows builds over to VC14, we're going to encounter some new assert dialogs from the CRT. These won't appear in release builds, but because the buildbots run tests against debug builds they will get in the way. A number of tests

[issue23303] test_license_exists_at_url() of test_site fails on x86 XP-4 3.4 buildbot

2015-01-24 Thread Ned Deily
Ned Deily added the comment: Are the Windows 3.4 and 3.x builds on the buildbot using different versions of OpenSSL? Certificate verifies would fail with 0.9.7. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org

Re: Python is DOOMED! Again!

2015-01-24 Thread Mark Lawrence
On 25/01/2015 01:00, Rick Johnson wrote: On Saturday, January 24, 2015 at 5:56:02 PM UTC-6, Mark Lawrence wrote: For at least the third time the PEP was written by three people, one of whom was the BDFL. Why do you keep insisting that he is wrong, surely it should be they ? TWO REASONS:

Re: Benchmarking some modules - strange result

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 1:36 PM, Dan Stromberg drsali...@gmail.com wrote: On Sat, Jan 24, 2015 at 6:24 PM, Chris Angelico ros...@gmail.com wrote: On Sun, Jan 25, 2015 at 1:11 PM, Dan Stromberg drsali...@gmail.com wrote: For simplicity, let's say I've been running the suite of performance tests

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-24 Thread ravas
We resolved it over at the comp.lang.tcl group. It turns out what Christian suggested affects what is selected when you double click a word. He later discovered a different method for producing what I want. Below is my test code that implements both of these things (tested with Python 3.4 and

Re: __bases__ misleading error message

2015-01-24 Thread Steven D'Aprano
Mario Figueiredo wrote: But that begs the OT question: How does Python maps names to memory addresses in the interpreter? It doesn't. You are thinking of an execution model like C or Pascal, where variables are best thought of as fixed memory addresses. But Python, like many modern languages

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-24 Thread Rick Johnson
On Saturday, January 24, 2015 at 9:17:57 PM UTC-6, ravas wrote: We resolved it over at the comp.lang.tcl group. It turns out what Christian suggested affects what is selected when you double click a word. He later discovered a different method for producing what I want. Below is my test code

Re: Hello World in Python

2015-01-24 Thread Christopher J. Pisz
On 1/24/2015 7:12 PM, Terry Reedy wrote: On 1/24/2015 6:53 PM, Christopher J. Pisz wrote: I am trying to help a buddy out. I am a C++ on Windows guy. This buddy of mine is learning Python at work on a Mac. I figured I could contribute with non language specific questions and such. When

[issue23119] Remove unicode specialization from set objects

2015-01-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Mark. I appreciate the effort looking at use cases. I'm reopening this one because I have an alternative patch that simplifies the code but keeps the unicode specialization. It replaces the lookkey indirection with a fast and predictable inline

Re: Delegation in Python

2015-01-24 Thread Gary Herron
On 01/24/2015 03:38 PM, Brian Gladman wrote: On 24/01/2015 23:22, Chris Angelico wrote: class RF(Fraction): def is_integer(self): return self.numerator % self.denominator == 0 Thanks for your help on this. I must admit that nowhere in a lot of searching did I find that delegation

Hello World in Python

2015-01-24 Thread Christopher J. Pisz
I am trying to help a buddy out. I am a C++ on Windows guy. This buddy of mine is learning Python at work on a Mac. I figured I could contribute with non language specific questions and such. When learning any new language, I said, the first step would be a Hello World program. Let's see if

Re: Delegation in Python

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 10:59 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: You can always monkey-path the Fraction class on the fly to add a new method to it. I think most would consider this a bad idea, but it does work. As regards this being a bad idea I'd suggest the latest score is

Re: Hello World in Python

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 10:53 AM, Christopher J. Pisz cp...@austin.rr.com wrote: So my buddy creates opens the IDE they gave at the workplace, creates a new project, adds a demo.py file, writes one line : print Hello World, hits Run in the IDE and indeed the display is shown at the bottom when

Re: Python simple Code

2015-01-24 Thread Denis McMahon
On Sat, 24 Jan 2015 16:16:16 -0800, Salem Alqahtani wrote: import sys import array a=['salem','Ali','sultan'] m = len(a) def Factorials(m): if m == 0: return 1 else: print m return m * Factorials(m-1) def output(): print a def main():

[issue20132] Many incremental codecs don’t handle fragmented data

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Here is a new patch which fixes the bytes-to-bytes incremental codecs. It depends on my patches for these other issues being applied first: * Issue 23231: Bytes-to-bytes support for iteren/decode() * Issue 13881: Generic StreamWriter from IncrementalEncoder *

[issue23152] fstat64 required on Windows

2015-01-24 Thread Steve Dower
Steve Dower added the comment: Huh, okay, looks like the patch still isn't sufficient (I forgot to put -uall when testing it...) - there are calls in fileio.c that need changing too. I'll try and do a thorough sweep of calls to fstat and post another patch in the next day or so. --

Re: Python is DOOMED! Again!

2015-01-24 Thread Rick Johnson
On Saturday, January 24, 2015 at 1:49:08 AM UTC-6, Steven D'Aprano wrote: Rick Johnson wrote: [... snip absurdities...] Duh! Do you think i just pulled stub files out my arse without giving all the other alternatives due consideration? Actually, yes. I think that had Guido proclaimed

Re: Delegation in Python

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 9:57 AM, Brian Gladman no...@nowhere.net wrote: But I am not clear on how to delegate from my new class to the existing Fraction class. This is what I have: -- class RF(Fraction): def __new__(self, x, y): super().__new__(self, x, y)

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 24/01/2015 23:22, Chris Angelico wrote: class RF(Fraction): def is_integer(self): return self.numerator % self.denominator == 0 Thanks for your help on this. I must admit that nowhere in a lot of searching did I find that delegation is achieved by doing nothing! Brian --

Re: Delegation in Python

2015-01-24 Thread Chris Angelico
On Sun, Jan 25, 2015 at 10:38 AM, Brian Gladman no...@nowhere.net wrote: On 24/01/2015 23:22, Chris Angelico wrote: class RF(Fraction): def is_integer(self): return self.numerator % self.denominator == 0 Thanks for your help on this. I must admit that nowhere in a lot of

Re: Python is DOOMED! Again!

2015-01-24 Thread Mark Lawrence
On 24/01/2015 23:20, Rick Johnson wrote: On Saturday, January 24, 2015 at 1:49:08 AM UTC-6, Steven D'Aprano wrote: Rick Johnson wrote: [... snip absurdities...] Duh! Do you think i just pulled stub files out my arse without giving all the other alternatives due consideration? Actually,

Re: Delegation in Python

2015-01-24 Thread Brian Gladman
On 24/01/2015 23:41, Gary Herron wrote: [snip] You can always monkey-path the Fraction class on the fly to add a new method to it. I think most would consider this a bad idea, but it does work. Try this: from fractions import Fraction def is_integer(self): ... return self.numerator

Re: Delegation in Python

2015-01-24 Thread Mark Lawrence
On 24/01/2015 23:41, Gary Herron wrote: On 01/24/2015 03:22 PM, Chris Angelico wrote: On Sun, Jan 25, 2015 at 9:57 AM, Brian Gladman no...@nowhere.net wrote: But I am not clear on how to delegate from my new class to the existing Fraction class. This is what I have:

Re: __bases__ misleading error message

2015-01-24 Thread Terry Reedy
On 1/24/2015 4:51 PM, Marco Buttu wrote: On 24/01/2015 20:24, Terry Reedy wrote: On 1/24/2015 5:16 AM, Mario Figueiredo wrote: Consider the following code at your REPL of choice class Sub: pass foo = Sub() Sub.__bases__ foo.__bases__ The last

Re: Python is DOOMED! Again!

2015-01-24 Thread Rick Johnson
On Saturday, January 24, 2015 at 5:56:02 PM UTC-6, Mark Lawrence wrote: For at least the third time the PEP was written by three people, one of whom was the BDFL. Why do you keep insisting that he is wrong, surely it should be they ? TWO REASONS: (1) I don't know either of those people.

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

2015-01-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the review comments. Updated the patch with the suggested changes. -- Added file: http://bugs.python.org/file37844/23300-3.3-v2.patch ___ Python tracker rep...@bugs.python.org

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

2015-01-24 Thread Berker Peksag
Berker Peksag added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-24 Thread ravas
I copied the GUI creation from my personal text editor. The scrollbar and stretchability could have been left out, for sure. You're only seeing a portion of a more complex GUI. After writing several Tkinter applications, I decided that subclassing without a clear reason only had the effect of

  1   2   >