On Dec 8, 3:09 am, Massi wrote:
> in my script I have a dictionary whose items are couples in the form
> (string, integer values), say
>
> D = {'a':1, 'b':2, 'c':3}
>
> This dictionary is passed to a function as a parameter, e.g. :
>
> def Sum(D) :
> return D['a']+D['b']+D['c']
>
> Is there a
Steven D'Aprano wrote:
Modulo is hardly an obscure operation. "What's the remainder...?" is a
simple question that people learn about in primary school.
Well, sort of. The way I remember it, the remainder was just
something that fell out as a side effect of division -- the
annoying bit left ov
For what it's worth, googling for "python asterisk"
gives this as the very first result:
http://www.technovelty.org/code/python/asterisk.html
which tells you exactly what you're probably wanting
to know if you ask that.
To check that this phenomemon isn't restricted to
asterisks in particular
On 12/11/2011 6:53 PM, Eelco Hoogendoorn wrote:
There are other means of finding information than Google. Really.
This is really only a very minor point in my argument, so I dont want to
put the focus on this.
On the contrary, it is a major point. You want us to change the language
so you ca
On 12/11/2011 6:44 PM, Eelco Hoogendoorn wrote:
Can you come up with some terse symbols that will be able to express all
of the below and dont make you wish you hadnt rather typed out the names?
head, tuple(tail) = iterable
head, list(tail) = iterable
head, str(tail) = somestring
head, generato
alex23 wrote:
On Dec 9, 8:08 pm, Robert Kern wrote:
On 12/9/11 5:02 AM, alex23 wrote:
The 3rd party 'decorator' module takes care of issues like docstrings
& function signatures. I'd really like to see some of that
functionality in the stdlib though.
Much of it is:
http://docs.python.org
The above examples are seldom needed in Python because we have one
general method to repeatedly split a sequence into head and tail.
it = iter(iterable) # 'it' now represents the sequenced iterable
head = next(it) # 'it' now represents the tail after removing the head
In other words, ne
> No more, or less, explicit than the difference between "==" and "is".
== may be taken to mean identity comparison; 'equals' can only mean one
thing. Of course 'formally' these symbols are well defined, but so is
brainf*ck
Modulo is hardly an obscure operation. "What's the remainder...?" i
On the contrary, it is a major point. You want us to change the language
so you can program by Google. Sorry, aint't gonna happen.
On the contrary; I believe I get to decide which points I consider
important. This one, I do not. Sorry for putting it in the first paragraph.
--
http://mail.pyt
> On the contrary, it is a major point.
Sorry, but im affraid it is up to ME to decide which point I feel are
important. No, this is a minor point to me, and one that has been
admirably put to rest by pointing out that spelling out the name of the
symbol in google directly leads you to the inf
Gelonida N writes:
> Do I loose anything if using nose. or example can all unit tests / doc
> tests still be run from nose?
AFAIK you don't loose anything by using nose – the unittests should all
be found and doctests can be run via `--with-doctest', I never used
doctests though.
regards
--
ht
Eelco Hoogendoorn writes:
> As for %; it is entirely unclear to me why that obscure operation
> ever got its own one-character symbol. Ill take 'mod', or even
> better, 'modulus' any day of the week.
The modulus is not the result but one of the arguments: when numbers x
and y are congruent modulo
Roy Smith wrote:
MRAB wrote:
or use 'globals':
def function(self):
logger = globals()['logger'].getChild('function')
logger.debug('stuff')
logger.debug('other stuff')
Ah-ha! That's precisely what I was looking for. Much appreciated.
Using the sa
> The modulus is not the result but one of the arguments: when numbers x
> and y are congruent modulo n (stated in terms of the modulo operation:
> x mod n = y mod n), the modulus is n. A word for x mod n is remainder.
>
> I agree about the obscurity of using the percent sign as the operator.
>
> A
By the way...
Is there any particular reason why some of my replies do not show up
on groups.google, and some of them do not show up on mail.python.org?
Sorry to annoy people with reposting, but im going to be forced to do
some of that until this is cleared up
--
http://mail.python.org/mailm
Eelco writes:
> > The modulus is not the result but one of the arguments: when numbers x
> > and y are congruent modulo n (stated in terms of the modulo operation:
> > x mod n = y mod n), the modulus is n. A word for x mod n is remainder.
> >
> > I agree about the obscurity of using the percent si
On Monday, December 12, 2011 1:47:52 PM UTC+8, alex23 wrote:
> On Dec 12, 2:51 pm, 8 Dihedral
> wrote:
> > To wrap a function properly is different from the 1-line lampda.
> >
> > This is really functional programming.
> >
> > Every function can be decorated to change into a different one easi
> No more, or less, explicit than the difference between "==" and "is".
== may be taken to mean identity comparison; 'equals' can only mean
one
thing. Of course 'formally' these symbols are well defined, but so is
brainf*ck
> Modulo is hardly an obscure operation. "What's the remainder...?" is a
On Monday, December 12, 2011 3:11:18 PM UTC+8, alex23 wrote:
> On Dec 8, 3:09 am, Massi wrote:
> > in my script I have a dictionary whose items are couples in the form
> > (string, integer values), say
> >
> > D = {'a':1, 'b':2, 'c':3}
> >
> > This dictionary is passed to a function as a parameter
On Monday, December 12, 2011 3:11:18 PM UTC+8, alex23 wrote:
> On Dec 8, 3:09 am, Massi wrote:
> > in my script I have a dictionary whose items are couples in the form
> > (string, integer values), say
> >
> > D = {'a':1, 'b':2, 'c':3}
> >
> > This dictionary is passed to a function as a parameter
Hi group,
I'm a bit confused regarding decorators. Recently started playing with
them with Python3 and wanted (as an excercise) to implement a simple
type checker first: I know there are lots of them out there, this is
actually one of the reasons I chose that particular function (to compare
my sol
On 12/12/2011 01:27 PM, Henrik Faber wrote:
Hi group,
I'm a bit confused regarding decorators. Recently started playing with
them with Python3 and wanted (as an excercise) to implement a simple
type checker first: I know there are lots of them out there, this is
actually one of the reasons I cho
On 12 December 2011 13:27, Henrik Faber wrote:
> Hi group,
>
> I'm a bit confused regarding decorators. Recently started playing with
> them with Python3 and wanted (as an excercise) to implement a simple
> type checker first: I know there are lots of them out there, this is
> actually one of the
On 12.12.2011 14:37, Andrea Crotti wrote:
> On 12/12/2011 01:27 PM, Henrik Faber wrote:
>> Hi group,
>>
>> I'm a bit confused regarding decorators. Recently started playing with
>> them with Python3 and wanted (as an excercise) to implement a simple
>> type checker first: I know there are lots of t
On 12.12.2011 14:45, Arnaud Delobelle wrote:
>> Can someone please enlighten me?
>
> You can (need to?) use the descriptor protocol to deal with methods.
>
> from functools import partial
[...]
>def __get__(self, obj, objtype):
>return partial(self, obj)
Whoa. This is abs
On 12 December 2011 13:52, Henrik Faber wrote:
> On 12.12.2011 14:45, Arnaud Delobelle wrote:
>
>>> Can someone please enlighten me?
>>
>> You can (need to?) use the descriptor protocol to deal with methods.
>>
>> from functools import partial
> [...]
>> def __get__(self, obj, objtype):
>>
> import subprocess
> p = subprocess.Popen(['du', '-sh'], cwd='/Users/jay/.Trash/',
>> stdout=subprocess.PIPE)
> out, err = p.communicate()
> out
>> ' 11M\t.\n'
> You might prefer to use subprocess.check_output(); it slightly
> simplifies your code:
> http://docs.python.or
On Sun, 11 Dec 2011 22:02:23 -0800, Chris Rebert wrote:
> p = subprocess.Popen(['du', '-sh'], cwd='/Users/jay/.Trash/',
> stdout=subprocess.PIPE)
> Alternatively, you can opt to use the shell by passing shell=True as
> an argument.
Except that the OP is talking about a directory passed
On 12/12/2011 3:09 AM, Gregory Ewing wrote:
people who don't become programmers, I suspect they never
have much use for remainders in everyday life.
Huh? Funny you should say 'everyday'. It is now 10 o'clock. In 20 hours,
it will be (10+20) % 12 == 6 o'clock. It is now day 1 of the week. In 9
On 12.12.2011 15:01, Arnaud Delobelle wrote:
>> I am very amazed -- I've been programming Python for about 5 years now
>> and have never even come close to something as a "descriptor protocol".
>> Python never ceases to amaze me. Do you have any beginners guide how
>> this works? The Pydoc ("Data
On 12/12/2011 5:59 AM, Jussi Piitulainen wrote:
Past experience in mathematics newsgroups tells me
that some mathematicians do not accept the existence of any remainder
operator at all.
Even though they carry hour/minute/second remindering devices on their
bodies and put year/month/day remai
On 12/12/2011 4:12 AM, Eelco Hoogendoorn wrote:
The above examples are seldom needed in Python because we have one
general method to repeatedly split a sequence into head and tail.
it = iter(iterable) # 'it' now represents the sequenced iterable
head = next(it) # 'it' now represents the tail a
Terry Reedy wrote:
> calculations are helped by the fact that (a+b) % c == a%c + b%c, so
As long as we understand that == here does not mean "equal", only
"congruent modulo c", e.g try a = 13, b = 12, c = 7.
Nick
--
http://mail.python.org/mailman/listinfo/python-list
hi all,
suppose I have a func F, list [args1,args2,args3,...,argsN] and want
to obtain r_i = F(args_i) in parallel mode. My difficulty is: if F
returns not None, than I should break calculations, and I can't dig in
multiprocessing module documentation how to do it. Order doesn't
matter for me (I ha
On 12 December 2011 15:52, Terry Reedy wrote:
> No, *target unpacking (singular) is quite useful in specialized cases. But
> it is not specifically head/tail unpacking.
>
a,*b,c = 1,2,3,4,5,6
a,b,c
> (1, [2, 3, 4, 5], 6)
*a,b,c = 1,2,3,4,5
a,b,c
> ([1, 2, 3], 4, 5)
>
>> I pers
Hi,
Wingware has released version 4.1.2 of Wing IDE, an integrated development
environment designed specifically for the Python programming language.
Wing IDE is a cross-platform Python IDE that provides a professional code
editor with vi, emacs, and other key bindings, auto-completion, call tip
On 12 December 2011 15:36, Terry Reedy wrote:
> Huh? Funny you should say 'everyday'. It is now 10 o'clock. In 20 hours, it
> will be (10+20) % 12 == 6 o'clock. It is now day 1 of the week. In 9 days it
> will be day (1+9) % 7 == 3 of the week. Mental calculations are helped by
> the fact that (a+
On Tue, Dec 13, 2011 at 2:55 AM, Nick Dokos wrote:
> Terry Reedy wrote:
>> calculations are helped by the fact that (a+b) % c == a%c + b%c, so
>
> As long as we understand that == here does not mean "equal", only
> "congruent modulo c", e.g try a = 13, b = 12, c = 7.
This is the basis of the gra
On Tue, Dec 13, 2011 at 3:15 AM, Arnaud Delobelle wrote:
>
> You mean (a + b) % c == (a%c + b%c) % c
>
> :)
It's just integer wraparound. Modulo 9 is the same as "render this
number in base 9 and take the last digit" (and printing a number in
base 9 would normally be done with mod 9 division), an
On 12/12/11 3:36 AM, alex23 wrote:
On Dec 9, 8:08 pm, Robert Kern wrote:
On 12/9/11 5:02 AM, alex23 wrote:
The 3rd party 'decorator' module takes care of issues like docstrings
&function signatures. I'd really like to see some of that
functionality in the stdlib though.
Much of it is:
Hi everyone, I've just started to use pydev to develop my python
application and I'm encountering some problems to debug it. The
application I'm dealing with is a multithreaded application; when I
try to debug it with pydev, it seems not to be able to handle the
execution of multiple threads. The p
On 12/12/11 1:25 AM, MRAB wrote:
On 12/12/2011 00:21, Steven D'Aprano wrote:
I've just started using a Debian system, instead of the usual RedHat
based systems I'm used to, and module.__file__ appears to have
disappeared for some (but not all) modules.
On Fedora:
[steve@orac ~]$ python -E
Pyth
Hi,
I'm new to this mailing list and new in python as well.
I need to automate a .exe console program in windows, and send key
characters like 'a', 'M' ... I don't need to take the output as is printed
in a different text log, but I'll have to send the messages to the program.
I had this running
Chris Angelico wrote:
> On Mon, Dec 12, 2011 at 9:28 AM, wrote:
> > I'm trying to use the python evolution (as in Gnome Evolution) module
> > but I can't find any documetation beyond the odd trivial example and
> > the API documentation at http://doc.conduit-project.org/evolution-python/
> > (or
Nose is absolutely the way to go for your testing needs. You can put
"__test__ = False" in modules or classes to stop test collection.
On Mon, Dec 12, 2011 at 5:44 AM, Thomas Bach wrote:
> Gelonida N writes:
>
>> Do I loose anything if using nose. or example can all unit tests / doc
>> tests st
Terry Reedy writes:
> On 12/12/2011 5:59 AM, Jussi Piitulainen wrote:
>
> > Past experience in mathematics newsgroups tells me
> > that some mathematicians do not accept the existence of any remainder
> > operator at all.
>
> Even though they carry hour/minute/second remindering devices on their
> > I personally quite like them, but I would like them to be more general.
>
> It already is. The *target can be anywhere in the sequence.
Im not sure if this is a genuine understanding, or trollish
obtuseness.
Yes, the target can be anywhere in the sequence. And yes, the
resulting list can con
> They recognize modular arithmetic but for some reason insist that
> there is no such _binary operation_. But as I said, I don't understand
> their concern. (Except the related concern about some programming
> languages, not Python, where the remainder does not behave well with
> respect to divisi
On Monday, December 12, 2011 12:44:27 PM Chris Angelico did opine:
> On Tue, Dec 13, 2011 at 2:55 AM, Nick Dokos
wrote:
> > Terry Reedy wrote:
> >> calculations are helped by the fact that (a+b) % c == a%c + b%c, so
> >
> > As long as we understand that == here does not mean "equal", only
> >
Jussi Piitulainen wrote:
> Terry Reedy writes:
> > On 12/12/2011 5:59 AM, Jussi Piitulainen wrote:
> >
> > > Past experience in mathematics newsgroups tells me
> > > that some mathematicians do not accept the existence of any remainder
> > > operator at all.
> >
> > Even though they carry hour/
On 12/12/2011 12:46 PM, gene heskett wrote:
On Monday, December 12, 2011 12:44:27 PM Chris Angelico did opine:
This is the basis of the grade-school "casting out nines" method of
checking arithmetic. Set c=9 and you can calculate N%c fairly readily
(digit sum - I'm assuming here that the arithm
On Mon, Dec 12, 2011 at 5:21 AM, Eelco wrote:
> You cannot; only constructors modelling a sequence or a dict, and
> only
> in that order. Is that rule clear enough?
The dict constructor can receive either a sequence or a mapping, so if
I write this:
def func(a, b, dict(c)):
what will I
Eelco writes:
> > They recognize modular arithmetic but for some reason insist that
> > there is no such _binary operation_. But as I said, I don't understand
> > their concern. (Except the related concern about some programming
> > languages, not Python, where the remainder does not behave well w
gene heskett wrote:
> On Monday, December 12, 2011 12:44:27 PM Chris Angelico did opine:
>
> > On Tue, Dec 13, 2011 at 2:55 AM, Nick Dokos
> wrote:
> > > Terry Reedy wrote:
> > >> calculations are helped by the fact that (a+b) % c == a%c + b%c, so
> > >
> > > As long as we understand that ==
On Dec 12, 7:09 pm, Ian Kelly wrote:
> On Mon, Dec 12, 2011 at 5:21 AM, Eelco wrote:
> > You cannot; only constructors modelling a sequence or a dict, and
> > only
> > in that order. Is that rule clear enough?
>
> The dict constructor can receive either a sequence or a mapping, so if
> I write th
On Mon, Dec 12, 2011 at 11:17 AM, Eelco wrote:
> Im not sure if I was clear on that, but I dont care what the
> constructors accept; I meant to overload on the concept the underlying
> type models. Dicts model a mapping, lists/tuples model a sequence. MI
> deriving from both these models is illega
> False.
I stand corrected.
> Or are you saying that only classes specifically derived from list,
> tuple, or dict should be considered, and custom containers that are
> not derived from any of those but implement the correct protocols
> should be excluded? If so, that sounds less than ideal.
T
To get back on topic a little bit, lets get back to the syntax of all
this: I think we all agree that recycling the function call syntax is
less than ideal, since while it works in special contexts like a
function signature, its symmetric counterpart inside a function call
already has the meaning o
On Dec 12, 8:05 pm, Eelco wrote:
> To get back on topic a little bit, lets get back to the syntax of all
> this: I think we all agree that recycling the function call syntax is
> less than ideal, since while it works in special contexts like a
> function signature, its symmetric counterpart inside
I am having some issues compiling an exe myself but most of that stems from the
version of python I am using. That being said, try using GUI2EXE
http://code.google.com/p/gui2exe this program makes the setup file go a lot
easier, also it will tie in a few different tools like py2exe which is wha
Steven D'Aprano wrote:
> And you can blame C for the use of % instead of mod or modulo.
Anytime you can blame C for something, you can also blame a bunch
of other languages for foolishly perpetuating the inanities of C.
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the
On Tue, Dec 13, 2011 at 3:40 AM, wrote:
> Actually I'm not sure if it's down to the docstrings because the help
> available from Python itself stops (not unreasonably) at the interface
> to the C library code. What I was after (and you have told me where
> it is) was the functions/methods availa
On Tue, Dec 13, 2011 at 3:41 AM, Juan Perez wrote:
> I need to automate a .exe console program in windows, and send key
> characters like 'a', 'M' ...
> I had this running in an autoIT script which with only activating cmd
> window, and with the "send" parameter I had all already done. But I'm hav
On Mon, 12 Dec 2011 12:13:33 +0100, Jean-Michel Pichavant wrote:
> Using the same name for 2 different objects is a bad idea in general.
We have namespaces precisely so you don't need to care about making names
globally unique.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On 12/12/2011 04:28 PM, Steven D'Aprano wrote:
On Mon, 12 Dec 2011 12:13:33 +0100, Jean-Michel Pichavant wrote:
Using the same name for 2 different objects is a bad idea in general.
We have namespaces precisely so you don't need to care about making names
globally unique.
True, but in this c
Wouldn't this be nicer, though?:
def getChildLogger(id):
return logger.getChild(id)
def someFunc():
logger = getChildLogger("someFunc")
-- UNTESTED --
No messing around with globals this way, and it's more extendable. And
'globals()["logger"].getChild("someFunc")' reads like a brick.
-
On 12/12/2011 12:12 PM, Eelco wrote:
Im not sure if this is a genuine understanding, or trollish
obtuseness.
If you are referring to what I write, it is based on genuine
understanding of Python.
Yes, the target can be anywhere in the sequence. And yes, the
resulting list can contain object
Is there something similar to curses available for the Windows version
of Python (2.7, community edition)? Preferably something built-in.
In general, I'm looking to do gui-ish things from within the command
window.
Also, in particular, is there a way to get the console size (rows,
cols). I've se
Dave Angel writes:
> True, but in this code, the function is trying to both use the global
> value, but also a local that deliberately has the same name, but a
> different meaning and "value". The CPython compiler doesn't make this
> easy, and I think the globals() technique is unnecessarily obsc
>
> > If a function knows of the presence of a global, it's not asking too
> > much for it to not re-use the same name in local scope.
>
> Yes.
It's just a function wanting to act as-if it were in a different
environment than its default. By that same reasoning you could state that
"If a function
On Dec 13, 7:15 am, Eric wrote:
> Is there something similar to curses available for the Windows version
> of Python (2.7, community edition)? Preferably something built-in.
> In general, I'm looking to do gui-ish things from within the command
> window.
>
> Also, in particular, is there a way to
On Dec 12, 10:49 pm, 8 Dihedral
wrote:
> This is the way to write an assembler or
> to roll out a script language to be included in an app
> by users.
This is a garbage comment that has absolutely nothing to do with the
topic at hand _at all_.
--
http://mail.python.org/mailman/listinfo/pytho
On Dec 12, 10:21 pm, Eelco wrote:
> > Modulo is hardly an obscure operation. "What's the remainder...?" is a
> > simple question that people learn about in primary school.
>
> So is 'how much wood would a woodchucker chuck if a woodchucker could
> chuck wood?'. But how often does that concept tu
> > Im not sure if this is a genuine understanding, or trollish
> > obtuseness.
>
> If you are referring to what I write, it is based on genuine
> understanding of Python.
This is getting 'interesting'. In a way. I meant to write
'misunderstanding', as I think the context made quite clear. So agai
On Dec 13, 3:12 am, Eelco wrote:
> But to relate it to the topic of this thread: no, the syntax does not
> allow one to select the type of the resulting sequence. It always
> constructs a list.
So by this argument, _every_ function that returns a list should take
an optional argument to specify a
On Mon, Dec 12, 2011 at 11:51 AM, Eelco wrote:
> Either way, its not hard to add some detail to the semantics to allow
> all this. Even this function definition:
>
> def func(Foo(args), Foo(kwargs))
>
> ...could even be defined unambigiously by overloading first on base
> type, and if that does no
On Dec 12, 5:47 pm, alex23 wrote:
> On Dec 13, 7:15 am, Eric wrote:
>
> > Is there something similar to curses available for the Windows version
> > of Python (2.7, community edition)? Preferably something built-in.
> > In general, I'm looking to do gui-ish things from within the command
> > win
On Dec 13, 2:27 am, Robert Kern wrote:
> On 12/12/11 3:36 AM, alex23 wrote:
>
> > On Dec 9, 8:08 pm, Robert Kern wrote:
> >> On 12/9/11 5:02 AM, alex23 wrote:
> >>> The 3rd party 'decorator' module takes care of issues like docstrings
> >>> & function signatures. I'd really like to see some of
rom pylab import *
plot([0,0],[1,1],label='Ubuntu 11.10')
Before I upgraded to 2.7.2+ / 4 OCt 2011, the following code added a
comment line with a legend.
Now, the same code makes the legend appear "off-screen", ie way
outside the axes limits.
Can anyone help? And/or is there a new way to add a ti
"""
Before I upgraded to 2.7.2+ / 4 OCt 2011, the following code added a
comment line to an axis legend using matplotlib / pylab.
Now, the same code makes the legend appear "off-screen", ie way
outside the axes limits.
Can anyone help? And/or is there a new way to add a title and footer
to the le
On Mon, 12 Dec 2011 16:58:33 -0500, Terry Reedy wrote:
> On 12/12/2011 12:12 PM, Eelco wrote:
>> Yes, we can cast the list to be whatever we want on the next line,
>
> Convert. For the very few cases one wants to do this, it is quite
> adequate.
+1
with the small proviso that there's not much
On Mon, Dec 12, 2011 at 4:40 PM, Eelco wrote:
>> For a linked list, no *target and no copying is needed:
>>
>> head, tail = llist
>
> I have no idea what this means.
Each node of a linked list consists of a data member and a "next"
member, that holds the next node in the list. The natural contai
On Mon, 12 Dec 2011 15:45:06 -0800, alex23 wrote:
> On Dec 12, 10:49 pm, 8 Dihedral
> wrote:
>> This is the way to write an assembler or to roll out a script language
>> to be included in an app by users.
>
> This is a garbage comment that has absolutely nothing to do with the
> topic at han
On 12/12/2011 06:48 PM, Joshua Landau wrote:
If a function knows of the presence of a global, it's not asking too
much for it to not re-use the same name in local scope.
Yes.
It's just a function wanting to act as-if it were in a different
environment than its default. By that same reasoning y
On Tue, 13 Dec 2011 09:27:09 +1100, Ben Finney wrote:
> Dave Angel writes:
>
>> True, but in this code, the function is trying to both use the global
>> value, but also a local that deliberately has the same name, but a
>> different meaning and "value". The CPython compiler doesn't make this
>>
On Mon, 12 Dec 2011 04:21:15 -0800, Eelco wrote:
>> No more, or less, explicit than the difference between "==" and "is".
>
> == may be taken to mean identity comparison; 'equals' can only mean one
> thing.
Nonsense. "Equals" can be taken to mean anything the language designer
chooses, same as
On Tue, Dec 13, 2011 at 1:43 PM, Steven D'Aprano
wrote:
> It merely happens that C's
> use of the notation % for the remainder operation likely influenced
> Python's choice of the same notation.
Considering that Python also had the notion that "integer divided by
integer yields integer" until Py3
On Mon, Dec 12, 2011 at 7:43 PM, Steven D'Aprano
wrote:
> If I want to collect a sequence of arguments into a string, why shouldn't
> I be allowed to write this?
>
> def func(parg, str(args)): ...
Obviously, because the correct syntax would be:
def func(parg, ''.join(args)): ...
:-P
--
http
On Mon, Dec 12, 2011 at 4:48 PM, Joshua Landau
wrote:
> Rebinding logger locally in a function is really no
> different to a subclass rebinding a variable from its main class using that
> class' value. The only difference is that, in that case, you have an
> alternate binding to the original value
89 matches
Mail list logo