On 21 Giu, 06:06, Ben Finney wrote:
> Chris Angelico writes:
> > On Tue, Jun 21, 2011 at 12:38 PM, Ben Finney
> > wrote:
> > > The *binding* is scoped.
>
> > And the binding follows the exact same rules as anything else would.
> > It has scope and visibility. In terms of the OP, the binding IS
Chris Angelico writes:
> On Tue, Jun 21, 2011 at 12:38 PM, Ben Finney
> wrote:
> > The *binding* is scoped.
>
> And the binding follows the exact same rules as anything else would.
> It has scope and visibility. In terms of the OP, the binding IS like a
> variable.
Yes. So let's stop behaving
On Tue, Jun 21, 2011 at 12:38 PM, Ben Finney wrote:
> The *binding* is scoped.
>
And the binding follows the exact same rules as anything else would.
It has scope and visibility. In terms of the OP, the binding IS like a
variable.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Tue, Jun 21, 2011 at 10:39 AM, Ben Finney
> wrote:
> > Instead, Python has objects, and references to those objects so you
> > can get at them. The Python documentation, much to my frustration,
> > calls these references “variables” even though that gives exactly
>
On Mon, 20 Jun 2011 15:35:35 -0700, gervaz wrote:
> Hi all, can you explain me why this simple function works well (i.e. I
> can call the print function using txt) in py
>
def test(value):
> ... if value%5: txt = "hello"
> ... else: txt = "test"
> ... print(txt)
>
> while in oth
On Tue, Jun 21, 2011 at 10:39 AM, Ben Finney wrote:
> gervaz writes:
> Python doesn't have variables the way C or many other languages have
> them.
>
> Instead, Python has objects, and references to those objects so you can
> get at them. The Python documentation, much to my frustration, calls
>
gervaz writes:
> Hi all, can you explain me why this simple function works well (i.e. I
> can call the print function using txt) in py
>
> >>> def test(value):
> ... if value%5: txt = "hello"
> ... else: txt = "test"
> ... print(txt)
>
> while in other languages like C the txt identif
On Tue, Jun 21, 2011 at 8:35 AM, gervaz wrote:
> Hi all, can you explain me why this simple function works well (i.e. I
> can call the print function using txt) in py
>
def test(value):
> ... if value%5: txt = "hello"
> ... else: txt = "test"
> ... print(txt)
It's as though you h