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
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
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
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
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
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23311
___
___
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
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?
--
___
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
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
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:
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
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
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
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
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
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
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
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.
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
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
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__'
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
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
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
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,
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:
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
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
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
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,
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
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
___
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
___
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.
--
___
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,
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
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
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
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23312
___
___
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 =
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
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 :-)
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
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
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
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
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
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
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
___
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
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
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
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
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
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
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
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
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)
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,
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
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:
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
___
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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():
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
*
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.
--
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
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)
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
--
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
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,
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
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:
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
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.
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
Berker Peksag added the comment:
LGTM.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23300
___
___
Python-bugs-list mailing list
Unsubscribe:
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 - 100 of 179 matches
Mail list logo