in 734904 20150123 225104 Tim Daneliuk wrote:
>On 01/21/2015 05:55 PM, Chris Angelico wrote:
>> On Thu, Jan 22, 2015 at 10:37 AM, Tim Daneliuk wrote:
>>> I find these kinds of discussions sort of silly. Once there is a critical
>>> mass of installed base, no language EVER dies.
>>
>> Not sure ab
On Sat, Jan 24, 2015 at 7:09 PM, Bob Martin wrote:
> http://www.oorexx.org/
>
> I use ooRexx every day, on Linux mostly, but also available on Windows.
So the question really is: Why that, as opposed to some other
language? Can you say, in one sentence, what ooRexx has that other
languages don't
Andrew Robinson wrote:
> But let me explain a bit more why I'm picking on Python: For even if we
> set the electronic engineering concerns aside that I've raised (and they
> are valid, as OOP is supposed to model reality, not reality be bent to
> match OOP) -- People's facile explanations about w
On Sat, Jan 24, 2015 at 5:51 AM, Steven D'Aprano
wrote:
> and Ruby has an experimental one:
>
> http://blog.codeclimate.com/blog/2014/05/06/gradual-type-checking-for-ruby/
Interesting. Ruby has avoided the magic comment, and the typing is
done in annotations rather than in the function signatu
Steven D'Aprano :
> Marko Rauhamaa wrote:
>
>>def weekday(day):
>>assert isinstance(day, int) and 0 <= day <= 6
>>...
>
> [...]
>
> Requiring the type-checker to parse and understand arbitrarily complex
> assertions would require the type-checker to be as complex as Python
> it
Steven D'Aprano,
Rick, you seem to be under the misapprehension that a reductio ad
absurdum argument is a fallacy. It is not. From Webster's dictionary:
Indirect demonstration, or Negative demonstration (called
also reductio ad absurdum), in which the correct
conclusion is an inference from the
On Fri, Jan 23, 2015 at 3:44 PM, wrote:
> On Friday, January 23, 2015 at 10:10:08 AM UTC-8, Tony the Tiger wrote:
>> On Thu, 22 Jan 2015 17:13:12 +, Automn wrote:
>>
>> > game
>>
>> No interest, at all, nada, zilch. zero, nothing.
>>
>> /Grrr
>
> Why don't you like fun?
I spend 10-12 hours
Consider the following code at your REPL of choice
class Super:
pass
class Sub:
pass
foo = Sub()
Sub.__bases__
foo.__bases__
The last statement originates the following error:
AttributeError: 'Sub' object has no attribute '__ba
On Fri, 23 Jan 2015 14:40:15 -0800, sohcahtoa82 wrote:
> On Monday, January 19, 2015 at 4:16:13 PM UTC-8, Luke Tomaneng wrote:
>> Has anyone noticed these? There have been about three of them recently
>> and they don't seem to have anything to do with Python at all. Does
>> anyone know if there is
Chris Angelico wrote:
> On Sat, Jan 24, 2015 at 9:38 AM, wrote:
>> Secondly, even if you find a module, keep in mind that the module probably
>> won't stay in Python land. It will probably call an external utility itself.
>>
>> If you REALLY wanted to check it without calling an external utilit
The starting point is an invalid jpg file, grabbed from a site showing
pictures from a webcam while the site is updating the picture itself. So
the upper part of the picture is ok, the lower part no.
If I execute this code
flags = cv2.CV_LOAD_IMAGE_COLOR
img = cv2.imread('bad.jpg', flags)
this
On Saturday 24 January 2015 03:09:51 Bob Martin did opine
And Gene did reply:
> in 734904 20150123 225104 Tim Daneliuk wrote:
> >On 01/21/2015 05:55 PM, Chris Angelico wrote:
> >> On Thu, Jan 22, 2015 at 10:37 AM, Tim Daneliuk
wrote:
> >>> I find these kinds of discussions sort of silly. Once t
On 2015-01-24 17:28, Chris Angelico wrote:
> but this is hardly generic. There's no convenient way to give an
> argument to a decorator that says "please assign this here", short
> of using some stupid eval hack... is there?
>
> (Incidentally, for a non-generic dispatch table, a callable dict
> su
Mario Figueiredo wrote:
>
> Consider the following code at your REPL of choice
>
> class Super:
> pass
Super is irrelevant here, since it isn't used.
> class Sub:
> pass
>
> foo = Sub()
>
> Sub.__bases__
> foo.__bases__
>
> The
On 2015-01-24 17:21, Steven D'Aprano wrote:
> # Cobra
> def sqroot(i as int) as float
>
> # Python
> def sqroot(i:int)->float:
>
>
> Cobra's use of "as" clashes with Python. In Python, "as" is used for
> name-binding:
>
> import module as name
> with open('file') as f
> except Exception as e
>
Mario Figueiredo wrote:
> In article <[email protected]>,
> [email protected] says...
>>
>> (Example modified for PEP8 compliance ;-)
>>
>> @typehint(arg1:str, arg2:int, returns:bool)
>> def myfunction(arg1, arg2):
>> return True
Tim Chase wrote:
> On 2015-01-24 17:21, Steven D'Aprano wrote:
>> # Cobra
>> def sqroot(i as int) as float
>>
>> # Python
>> def sqroot(i:int)->float:
>>
>>
>> Cobra's use of "as" clashes with Python. In Python, "as" is used for
>> name-binding:
>>
>> import module as name
>> with open('file')
in 734937 20150124 081658 Chris Angelico wrote:
>On Sat, Jan 24, 2015 at 7:09 PM, Bob Martin wrote:
>> http://www.oorexx.org/
>>
>> I use ooRexx every day, on Linux mostly, but also available on Windows.
>
>So the question really is: Why that, as opposed to some other
In article <[email protected]>,
Steven D'Aprano wrote:
> Tim Chase wrote:
>
> > On 2015-01-24 17:21, Steven D'Aprano wrote:
> >> # Cobra
> >> def sqroot(i as int) as float
> >>
> >> # Python
> >> def sqroot(i:int)->float:
> >>
> >>
> >> Cobra's use of "as" c
In article <[email protected]>,
[email protected] says...
>
> I'm not sure if you're making a general observation or one which is
> specific
> to Python. Plenty of languages have static analysis as a language feature.
> Are you arguing they are
in 734949 20150124 113420 Gene Heskett wrote:
>On Saturday 24 January 2015 03:09:51 Bob Martin did opine
>And Gene did reply:
>> in 734904 20150123 225104 Tim Daneliuk wrote:
>> >On 01/21/2015 05:55 PM, Chris Angelico wrote:
>> >> On Thu, Jan 22, 2015 at 10:37 A
In article , [email protected]
says...
>
> In article <[email protected]>,
> [email protected] says...
> >
> > def myfunction(arg1, arg2):
> > """
> > Normal docstring.
> > @typehint: (str, int) -> bool"""
> > return True
> >
On 24/01/2015 01:15, Chris Angelico wrote:
On Sat, Jan 24, 2015 at 12:00 PM, Sturla Molden wrote:
But without a thriving community, Python has no value to me.
If we add type hinting, then that community will go away, because other
languages are better options.
Who will win? Julia? Ruby? They
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 :-)
Always rounding down I take it? :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you c
Version 0.1.4 of Sarge, a cross-platform library which wraps the subprocess
module in the standard library, has been released.
What changed?
-
- Fixed issue #20: Now runs a pipeline in a separate thread if async.
- Fixed issue #21: The command line isn't parsed if shell=True is speci
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 :-)
>>
>
> Always rounding down I take it? :)
I'm hurt. I have a maths degree, I know how to do
Mario Figueiredo wrote:
> In article <[email protected]>,
> [email protected] says...
>>
>> I'm not sure if you're making a general observation or one which is
>> specific
>> to Python. Plenty of languages have static analysis as a language
>>
On Sun, Jan 25, 2015 at 3:00 AM, Steven D'Aprano
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 :-)
>>>
>>
>> Always rounding down
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 os.listd
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 w
Rick Johnson wrote:
> 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)
Chris Angelico wrote:
> On Sun, Jan 25, 2015 at 3:00 AM, Steven D'Aprano
> 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 24/01/2015 17:26, Steven D'Aprano wrote:
Rick Johnson wrote:
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
Steven D'Aprano 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 mechanism to allow arbitrary
syntax, e.
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 floa
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 sa
On Sunday, January 25, 2015 at 12:15:28 AM UTC+5:30, Tim Chase wrote:
> 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-snip
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. Normall
On Sun, Jan 25, 2015 at 5:56 AM, Ethan Furman 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 = dispatch_table
> de
On Sun, Jan 25, 2015 at 4:37 AM, Paul Rubin wrote:
> Steven D'Aprano 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 t
On Sat, Jan 24, 2015 at 11:55 AM, Chris Angelico 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, etc. (Augment
On 2015-01-24 19:55, Chris Angelico wrote:
On Sun, Jan 25, 2015 at 5:56 AM, Ethan Furman 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.disp
On 1/24/15, Steven D'Aprano wrote:
> Fetchinson . wrote:
>
>> On 1/23/15, Steven D'Aprano wrote:
> [...]
>>> Cobra is especially close to Python-like syntax, and supports unit tests
>>> as well:
>>>
>>>
>>> def sqroot(i as int) as float
>>> require
>>>i > 0
>>> ens
In article ,
[email protected] 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 first reaction is to look at 'Sub' as a noun, not an
>
> 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¢ a
In article <[email protected]>,
[email protected] says...
> > AttributeError: 'Sub' instance has no attribute '__bases__',
> > AttributeError: 'foo' object has no attribute '__bases__'
>
> The first would be nice. The second is
Am 23.01.15 um 20:23 schrieb Rick Johnson:
> On Thursday, January 22, 2015 at 9:22:40 PM UTC-6, Terry Reedy wrote:
>> that it is already an option in mypy and is part of the new
>> type-hint proposal.
>
> An *OPTION*? If it is not mandatory then why bother? If
> authors have a choice between writi
On Sat, Jan 24, 2015 at 2:14 PM, Mario Figueiredo wrote:
> In article <[email protected]>,
> [email protected] says...
>> > AttributeError: 'Sub' instance has no attribute '__bases__',
>> > AttributeError: 'foo' object has no att
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 2:14 PM, alister
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 push for complexity,
On 1/24/2015 4:14 PM, Mario Figueiredo wrote:
In article <[email protected]>,
[email protected] says...
AttributeError: 'Sub' instance has no attribute '__bases__',
AttributeError: 'foo' object has no attribute '__bases__'
In article ,
[email protected] 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 __main__
>
> > y = a_name + 1
>
> This
In article ,
[email protected] says...
>
> On Sat, Jan 24, 2015 at 2:14 PM, Mario Figueiredo wrote:
> > But that begs the OT question:
>
> No, it doesnt. http://en.wikipedia.org/wiki/Begging_the_question
Cute.
> I'm not sure I'm understanding what you're asking, but the import
> statement
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 Sat, Jan 24, 2015 at 3:02 PM, Mario Figueiredo wrote:
> In article ,
> [email protected] 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 modul
On Sun, Jan 25, 2015 at 9:09 AM, Mario Figueiredo 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:
> pass
>
In article ,
[email protected] says...
>
> Let me explain by way of analogy.
[snipped]
Gotcha! Thanks for the explanation :)
--
https://mail.python.org/mailman/listinfo/python-list
In article <[email protected]>,
[email protected] 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 p
On Sun, Jan 25, 2015 at 9:33 AM, Mario Figueiredo wrote:
> In article ,
> [email protected] says...
>>
>> Let me explain by way of analogy.
> [snipped]
>
> Gotcha! Thanks for the explanation :)
Awesome! I'm always a bit wary of analogies... sometimes they're
really helpful, other times they're unh
In article ,
[email protected] 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 seen in the
> disassembly:
[snipped]
Yes. I got
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 to
In article ,
[email protected] 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 them literally. They are
analogies, after all. But th
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 proba
On Sun, Jan 25, 2015 at 9:57 AM, Brian Gladman 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)
>
> def is
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 pr
On Sun, Jan 25, 2015 at 10:20 AM, Rick Johnson
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 would be doing
> ourselve
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 01/24/2015 03:22 PM, Chris Angelico wrote:
On Sun, Jan 25, 2015 at 9:57 AM, Brian Gladman 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):
sup
In article ,
[email protected] says...
>
> On Sun, Jan 25, 2015 at 10:20 AM, Rick Johnson
> 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
On Sun, Jan 25, 2015 at 10:38 AM, 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
On Sun, Jan 25, 2015 at 10:39 AM, Mario Figueiredo wrote:
> In article ,
> [email protected] says...
>>
>> On Sun, Jan 25, 2015 at 10:20 AM, Rick Johnson
>> 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
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
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
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, yes.
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 we
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 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(Fractio
On 24/01/2015 23:47, Gary Herron wrote:
> 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 n
On Sun, Jan 25, 2015 at 10:53 AM, Christopher J. Pisz
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 it
> executes.
On Sun, Jan 25, 2015 at 10:59 AM, Mark Lawrence 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
> Practicality
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 the numbers. I want the people names are the resu
On 24/01/2015 23:43, Chris Angelico wrote:
> On Sun, Jan 25, 2015 at 10:38 AM, 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 mu
On Sun, Jan 25, 2015 at 11:18 AM, Brian Gladman 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 want more than
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(
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 peop
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 th
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 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, dis
Hi folks.
I've been benchmarking some python modules that are mostly variations
on the same theme.
For simplicity, let's say I've been running the suite of performance
tests within a single interpreter - so I test one module thoroughly,
then move on to the next without exiting the interpreter.
I
On Sun, Jan 25, 2015 at 1:11 PM, Dan Stromberg wrote:
> For simplicity, let's say I've been running the suite of performance
> tests within a single interpreter - so I test one module thoroughly,
> then move on to the next without exiting the interpreter.
> [chomp more details]
Do the modules imp
Tim Chase wrote:
> 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 gre
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:
Hi Ethan,
On Saturday, January 24, 2015 at 9:00:12 PM UTC-5, Ethan Furman wrote:
> [...]
> __name__ being one of them. One of the reasons lambda
> is not encouraged is because its name is always '', which just
> ain't helpful when the smelly becomes air borne! ;)
Doesn't the traceback tell us e
On Sat, Jan 24, 2015 at 6:24 PM, Chris Angelico wrote:
> On Sun, Jan 25, 2015 at 1:11 PM, Dan Stromberg wrote:
>> For simplicity, let's say I've been running the suite of performance
>> tests within a single interpreter - so I test one module thoroughly,
>> then move on to the next without exitin
On Sun, Jan 25, 2015 at 1:36 PM, Dan Stromberg wrote:
> On Sat, Jan 24, 2015 at 6:24 PM, Chris Angelico wrote:
>> On Sun, Jan 25, 2015 at 1:11 PM, Dan Stromberg wrote:
>>> For simplicity, let's say I've been running the suite of performance
>>> tests within a single interpreter - so I test one m
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 tcl
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 PyCh
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 Sat, Jan 24, 2015 at 6:37 PM, Chris Angelico wrote:
> On Sun, Jan 25, 2015 at 1:36 PM, Dan Stromberg wrote:
>> On Sat, Jan 24, 2015 at 6:24 PM, Chris Angelico wrote:
>>> On Sun, Jan 25, 2015 at 1:11 PM, Dan Stromberg wrote:
For simplicity, let's say I've been running the suite of perfor
1 - 100 of 110 matches
Mail list logo