Message from discussion
static single type assignment
Received: by 10.204.154.149 with SMTP id o21mr2919425bkw.14.1317457782586;
Sat, 01 Oct 2011 01:29:42 -0700 (PDT)
X-BeenThere: shedskin-discuss@googlegroups.com
Received: by 10.204.135.155 with SMTP id n27ls1076936bkt.0.gmail; Sat, 01 Oct
2011 01:29:41 -0700 (PDT)
Received: by 10.204.144.201 with SMTP id a9mr2809459bkv.8.1317457781619;
Sat, 01 Oct 2011 01:29:41 -0700 (PDT)
Received: by 10.204.144.201 with SMTP id a9mr2809458bkv.8.1317457781598;
Sat, 01 Oct 2011 01:29:41 -0700 (PDT)
Return-Path: <willvar...@gmail.com>
Received: from mail-bw0-f47.google.com (mail-bw0-f47.google.com [209.85.214.47])
by gmr-mx.google.com with ESMTPS id z6si1307732bku.0.2011.10.01.01.29.41
(version=TLSv1/SSLv3 cipher=OTHER);
Sat, 01 Oct 2011 01:29:41 -0700 (PDT)
Received-SPF: pass (google.com: domain of willvar...@gmail.com designates 209.85.214.47 as permitted sender) client-ip=209.85.214.47;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of willvar...@gmail.com designates 209.85.214.47 as permitted sender) smtp.mail=willvar...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-bw0-f47.google.com with SMTP id 11so2789286bke.6
for <shedskin-discuss@googlegroups.com>; Sat, 01 Oct 2011 01:29:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=Qm6k0l3ebV69nrBu0VLpBf6FNXBtMqZ7ghKst4jE+oA=;
b=NHnp0y8bG+9raDaDrL8LMsgE8d7ad/Qv8K5so5HeU6y0mzsD+JCGH0mWr17eA9xv9k
E+gdx84yWPDMdN+Ub9W6IZkZckZ8uOBUskdQqgE1NduLmp3dZbFXtpdCtck9iINOmq2w
sDjFTgl5UpyzgP289VWgiLGK9SjfZAiNKRPKw=
MIME-Version: 1.0
Received: by 10.204.142.148 with SMTP id q20mr8420090bku.399.1317457781313;
Sat, 01 Oct 2011 01:29:41 -0700 (PDT)
Received: by 10.204.145.26 with HTTP; Sat, 1 Oct 2011 01:29:40 -0700 (PDT)
Received: by 10.204.145.26 with HTTP; Sat, 1 Oct 2011 01:29:40 -0700 (PDT)
In-Reply-To: <CAKkef2yv4Y-83-TUxcMYs=Yc85xt-31NW0m2zte9Ew81BJV...@mail.gmail.com>
References: <be3703f4-3db1-49f0-9e19-727d2cf52...@d26g2000vby.googlegroups.com>
<CAA2zXtBjox20zrD_y6Rae0iCpB+kD8aDoc5DMNcREXncny_...@mail.gmail.com>
<4E8624B5.4010...@gmail.com>
<285bfdca-638c-4028-af17-a3a2b44aa...@q24g2000vby.googlegroups.com>
<CAA2zXtDGfYg8OfCdWUHrLfWTxE1WZN29-aCYhuXRdUCo+is...@mail.gmail.com>
<CAKkef2yv4Y-83-TUxcMYs=Yc85xt-31NW0m2zte9Ew81BJV...@mail.gmail.com>
Date: Sat, 1 Oct 2011 10:29:40 +0200
Message-ID: <CAKkef2ysPjDBoLH86_14rND6WQGu8jck+xk46HomKqLrf_r...@mail.gmail.com>
Subject: Re: static single type assignment
From: "willvar...@gmail.com" <willvar...@gmail.com>
To: shedskin-discuss@googlegroups.com
Content-Type: multipart/alternative; boundary=001517447a060fd13e04ae388bac
--001517447a060fd13e04ae388bac
Content-Type: text/plain; charset=UTF-8
Yes by 'alias' I meant 'mask' and you clarified the python scope rules for
me.
At the moment shesdkin is a bit too restricted for my taste regards reusing
a local variable name as a different type. By relegating a local variable
to the tempvars when it is reassigned at the same ident/parent as the
previous assignment i hope to broaden the python that shedakin accepts.
On Sep 30, 2011 11:43 PM, "John Yeung" <gallium.arsen...@gmail.com> wrote:
On Fri, Sep 30, 2011 at 5:18 PM, Will 'Varfar' <willvar...@gmail.com> wrote:
> To explain my (possib...
Well, the point of ShedSkin is to do what Python does, as much as
possible, so in this case, m is local to func, and this is therefore
an UnboundLocalError.
> m = 0 <--- works because its aliasing the global
Maybe we understand "alias" differently. In Python, this is a local
variable that *masks* the global. It is completely different than the
global and can be freely assigned within func.
In general, I didn't follow your examples at all. But I haven't
really used ShedSkin other than some hello-world-type stuff, so my
understanding of ShedSkin could just be insufficient. I imagine
Fahrzin understood what you were saying.
John
--
You received this message because you are subscribed to the Google Groups
"shedskin-discuss" gr...
--001517447a060fd13e04ae388bac
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<p>Yes by 'alias' I meant 'mask' and you clarified the pyth=
on scope rules for me.</p>
<p>At the moment shesdkin is a bit too restricted for my taste regards reus=
ing a local variable name as a different type.=C2=A0 By relegating a local =
variable to the tempvars when it is reassigned at the same ident/parent as =
the previous assignment i hope to broaden the python that shedakin accepts.=
</p>
<p><blockquote type=3D"cite">On Sep 30, 2011 11:43 PM, "John Yeung&quo=
t; <<a href=3D"mailto:gallium.arsen...@gmail.com">gallium.arsenide@gmail=
.com</a>> wrote:<br><br><p><font color=3D"#500050">On Fri, Sep 30, 2011 =
at 5:18 PM, Will 'Varfar' <<a href=3D"mailto:willvar...@gmail.co=
m">willvar...@gmail.com</a>> wrote:<br>
> To explain my (possib...</font></p>Well, the point of ShedSkin is to d=
o what Python does, as much as<br>
possible, so in this case, m is local to func, and this is therefore<br>
an UnboundLocalError.<br>
<p><font color=3D"#500050"><br>> =C2=A0 m =3D 0 =C2=A0 =C2=A0<--- wor=
ks because its aliasing the global<br></font></p>Maybe we understand "=
alias" differently. =C2=A0In Python, this is a local<br>
variable that *masks* the global. =C2=A0It is completely different than the=
<br>
global and can be freely assigned within func.<br>
<br>
In general, I didn't follow your examples at all. =C2=A0But I haven'=
;t<br>
really used ShedSkin other than some hello-world-type stuff, so my<br>
understanding of ShedSkin could just be insufficient. =C2=A0I imagine<br>
Fahrzin understood what you were saying.<br>
<font color=3D"#888888"><br>
John<br>
</font><p><font color=3D"#500050"><br>-- <br>You received this message beca=
use you are subscribed to the Google Groups "shedskin-discuss" gr=
...</font></p></blockquote></p>
--001517447a060fd13e04ae388bac--