On Sun, Jun 19, 2016 at 4:04 AM, Danny Yoo wrote:
>
>> def f((x,y), z):
> ... print x, y, z
> ...
>> f([1, 2], 3)
> 1 2 3
Note that Python 3 doesn't support tuple parameter unpacking. See PEP 3113:
https://www.python.org/dev/peps/pep-3113
___
Tu
On Sat, Jun 18, 2016 at 11:18 PM, boB Stepp wrote:
> On Sun, May 29, 2016 at 9:28 AM, Peter Otten <__pete...@web.de> wrote:
>
>> Here's a commandline example with two views (the circle-drawing routine has
>> to be fixed)...
>
> I have to admit that now that I have finally gotten around to your
> c
One other thing to add: the notion of pattern matching is often used
in mathematics. For example, if we want to define a function that
does something special to even numbers vs. odd numbers, it's not
uncommon to see the following when we want to describe a function `f`:
for `n` in the natural num
On Sun, May 29, 2016 at 9:28 AM, Peter Otten <__pete...@web.de> wrote:
> Here's a commandline example with two views (the circle-drawing routine has
> to be fixed)...
I have to admit that now that I have finally gotten around to your
code, I am left scratching my head. My main issue is what am I
> You know Steve, as I was typing the beginning of a reply responding to
> a similar question you asked earlier in your response, I suddenly
> realized how ridiculous having a parameter of 'col/2' is! I'll just
> have either eat crow or attribute this to a brain fart. You pick!
Just to play dev
On Sat, Jun 18, 2016 at 9:10 PM, Steven D'Aprano wrote:
> On Sat, Jun 18, 2016 at 02:04:46PM -0500, boB Stepp wrote:
> Can you explain what you expected
>
> def d(row, col/2)
>
> to mean? I have literally no idea.
You know Steve, as I was typing the beginning of a reply responding to
a similar q
On Sat, Jun 18, 2016 at 02:04:46PM -0500, boB Stepp wrote:
> I have (Finally!) gotten a bit of time to look at Peter's answer to my
> Model-View-Controller question from May 29th, particularly his
> CircleImageView class to which he added a "#FIXME" comment. I thought
> it would be helpful to abbr
On 18/06/16 20:04, boB Stepp wrote:
> py3: def d(row, col/2, radius=5):
> File "", line 1
> def d(row, col/2, radius=5):
> ^
> SyntaxError: invalid syntax
>
> And this surprised me. It seems that only identifiers are allowed as
> parameters in a function definition statem
On Sat, Jun 18, 2016 at 3:14 PM, Joel Goldstick
wrote:
> On Sat, Jun 18, 2016 at 3:04 PM, boB Stepp wrote:
>> Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900
>> 64 bit (AMD64)] on win32
>> Type "help", "copyright", "credits" or "license" for more information.
>> py3: def d(
On Sat, Jun 18, 2016 at 3:04 PM, boB Stepp wrote:
> I have (Finally!) gotten a bit of time to look at Peter's answer to my
> Model-View-Controller question from May 29th, particularly his
> CircleImageView class to which he added a "#FIXME" comment. I thought
> it would be helpful to abbreviate h
I have (Finally!) gotten a bit of time to look at Peter's answer to my
Model-View-Controller question from May 29th, particularly his
CircleImageView class to which he added a "#FIXME" comment. I thought
it would be helpful to abbreviate his distance function in the
interpreter while I played arou
On Fri, Jun 17, 2016 at 11:25:40PM -0700, Hershel Millman wrote:
> Hello tutors,
>
> I have been learning basic python on my Macintosh computer and
> everything I have tried so far has worked, except when I tried to use
> the turtle module. I then used my Linux computer and the turtle module
>
Lulu J wrote:
> Hi there,
>
> My apologies if this is a trivial question but I am sort of new to python.
> Here is my problem:
> I have a list of dictionaries. Each dictionary has a word and its position
> in the text the positions are in the form of a tuple.
> Here is an example:
> [
> {'positi
On Fri, Jun 17, 2016, 6:12 PM Lulu J wrote:
> Hi there,
>
> My apologies if this is a trivial question but I am sort of new to python.
> Here is my problem:
> I have a list of dictionaries. Each dictionary has a word and its position
> in the text the positions are in the form of a tuple.
> Here
Hello tutors,
I have been learning basic python on my Macintosh computer and everything I
have tried so far has worked, except when I tried to use the turtle module. I
then used my Linux computer and the turtle module still did not work. I tried
to use the command line and type "sudo dnf instal
15 matches
Mail list logo