Michael Torrie於 2013年6月20日星期四UTC+8下午2時01分11秒寫道:
But since the LISP never really got a form beyond S-expressions,
leaving us with lots of parenthesis everywhere, Python wins much as the
Hitchhiker's Guide to the Galaxy wins.
Yep, a list is mutable even it's empty.
But constant integers,
Am 12.06.2013 03:46 schrieb Rick Johnson:
On Tuesday, June 11, 2013 8:25:30 PM UTC-5, nagia@gmail.com wrote:
is there a shorter and more clear way to write this?
i didnt understood what Rick trie to told me.
My example included verbatim copies of interactive sessions within the Python
On 06/19/2013 11:48 PM, Steven D'Aprano wrote:
On Wed, 19 Jun 2013 23:16:51 -0600, Michael Torrie wrote:
The real power and expressivity of Python comes from embracing the
abstractions that Python provides to your advantage. There's a certain
elegance and beauty that comes from such things,
Νίκος schreef:
Στις 18/6/2013 12:05 μμ, ο/η Steven D'Aprano έγραψε:
Names are *always* linked to objects, not to other names.
a = []
b = a # Now a and b refer to the same list
a = {} # Now a refers to a dict, and b refers to the same list as before
I see, thank you Steven.
But since this
On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel da...@davea.name wrote:
Names are *one of* the ways we specify which objects are to be used. (We can
also specify objects via an container and a subscript or slice, or via an
attribute of another object. And probably another way or two.)
But you
Στις 19/6/2013 8:08 πμ, ο/η Tim Roberts έγραψε:
Nick the Gr33k supp...@superhost.gr wrote:
On 16/6/2013 4:55 ??, Tim Roberts wrote:
Nick the Gr33k supp...@superhost.gr wrote:
Because Python lets you use arbitrary values in a Boolean context, the net
result is exactly the same.
What is an
On 06/19/2013 03:14 AM, Chris Angelico wrote:
On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel da...@davea.name wrote:
Names are *one of* the ways we specify which objects are to be used. (We can
also specify objects via an container and a subscript or slice, or via an
attribute of another object.
On Wed, Jun 19, 2013 at 6:06 PM, Dave Angel da...@davea.name wrote:
On 06/19/2013 03:14 AM, Chris Angelico wrote:
On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel da...@davea.name wrote:
Names are *one of* the ways we specify which objects are to be used. (We
can
also specify objects via an
On Wed, 19 Jun 2013 18:21:40 +1000, Chris Angelico wrote:
You can't reference an object without
somewhere having either a name or a literal to start it off.
True, but not necessarily a name bound to the object you are thinking of:
some_function()
gives you an object, but it's not a literal,
On Wed, Jun 19, 2013 at 6:55 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Wed, 19 Jun 2013 18:21:40 +1000, Chris Angelico wrote:
You can't reference an object without
somewhere having either a name or a literal to start it off.
True, but not necessarily a name bound to
On 06/18/2013 03:51 AM, Νίκος wrote:
Στις 18/6/2013 12:05 μμ, ο/η Steven D'Aprano έγραψε:
Names are *always* linked to objects, not to other names.
a = []
b = a # Now a and b refer to the same list
a = {} # Now a refers to a dict, and b refers to the same list as before
I see, thank you
On 06/19/2013 11:16 PM, Michael Torrie wrote:
It turns out that lists, hashes (dicts), and classes can pretty much
do anything with having to much about with C-style pointers and
such.
Oh wow. Parse error. should read, pretty much do anything without
having to muck about with C-style pointers
On Wed, 19 Jun 2013 23:16:51 -0600, Michael Torrie wrote:
The real power and expressivity of Python comes from embracing the
abstractions that Python provides to your advantage. There's a certain
elegance and beauty that comes from such things, which I believe really
comes from the elegance
On Tue, 18 Jun 2013 00:12:34 -0400, Dave Angel wrote:
On 06/17/2013 10:42 PM, Steven D'Aprano wrote:
On Mon, 17 Jun 2013 21:06:57 -0400, Dave Angel wrote:
On 06/17/2013 08:41 PM, Steven D'Aprano wrote:
SNIP
In Python 3.2 and older, the data will be either UTF-4 or UTF-8,
selected
On 06/17/2013 08:50 AM, Simpleton wrote:
On 17/6/2013 2:58 μμ, Michael Torrie wrote:
a = 5
b = a
a --- memory address
b --- memory address
I like to think a and b as references to the same memory address
Not quite: a and b _are_ memory addresses, At the same time, a and b are references to
On Mon, 17 Jun 2013 23:39:10 -0700, Larry Hudson wrote:
On 06/17/2013 08:50 AM, Simpleton wrote:
On 17/6/2013 2:58 μμ, Michael Torrie wrote:
a = 5
b = a
a --- memory address
b --- memory address
I like to think a and b as references to the same memory address
Not quite: a and b _are_
Στις 18/6/2013 9:39 πμ, ο/η Larry Hudson έγραψε:
Not quite: a and b _are_ memory addresses, At the same time, a and b
are references to the data (the objects) stored in those memory locations.
The distinction is probably more important in languages like C/C++,
where the _language_ gives you
On Tue, 18 Jun 2013 11:49:36 +0300, Νίκος wrote:
Στις 18/6/2013 9:39 πμ, ο/η Larry Hudson έγραψε:
Not quite: a and b _are_ memory addresses, At the same time, a and b
are references to the data (the objects) stored in those memory
locations.
The distinction is probably more important in
Στις 18/6/2013 12:05 μμ, ο/η Steven D'Aprano έγραψε:
Names are *always* linked to objects, not to other names.
a = []
b = a # Now a and b refer to the same list
a = {} # Now a refers to a dict, and b refers to the same list as before
I see, thank you Steven.
But since this is a fact how do
On Tue, Jun 18, 2013 at 7:51 PM, Νίκος supp...@superhost.gr wrote:
Στις 18/6/2013 12:05 μμ, ο/η Steven D'Aprano έγραψε:
Names are *always* linked to objects, not to other names.
a = []
b = a # Now a and b refer to the same list
a = {} # Now a refers to a dict, and b refers to the same list
On 13.06.2013 20:00, Νικόλαος Κούρας wrote:
if '-' not in name + month + year:
cur.execute( '''SELECT * FROM works WHERE clientsID =
(SELECT id FROM clients WHERE name = %s) and MONTH(lastvisit) = %s and
YEAR(lastvisit) = %s ORDER BY lastvisit ASC''', (name, month, year) )
Nick the Gr33k supp...@superhost.gr wrote:
On 16/6/2013 4:55 ??, Tim Roberts wrote:
Nick the Gr33k supp...@superhost.gr wrote:
Because Python lets you use arbitrary values in a Boolean context, the net
result is exactly the same.
What is an arbitrary value? don even knwo what arbitrary means
I think this is an excellent description of name binding with mutable
objects. I just have one clarification to insert below.
On 06/19/2013 01:08 AM, Tim Roberts wrote:
Nick the Gr33k supp...@superhost.gr wrote:
On 16/6/2013 4:55 ??, Tim Roberts wrote:
Nick the Gr33k supp...@superhost.gr
On Mon, 17 Jun 2013 08:17:48 +0300, Νίκος wrote:
[...]
The latter is false because the binding of b to the int 6 was broken
in order to bind b to the int 5.
Very surprising.
a and b was *references* to the same memory address, it was like a
memory address having 2 names to be addresses as.
On Jun 17, 2013, at 6:17, Νίκος supp...@superhost.gr wrote:
On 16/6/2013 9:53 μμ, R. Michael Weylandt wrote:
On Sun, Jun 16, 2013 at 2:47 PM, Ferrous Cranus supp...@superhost.gr wrote:
On 16/6/2013 2:13 μμ, Jussi Piitulainen wrote:
If, instead of the above, you have
a = 6
b = a
b = 5
On 17/6/2013 9:51 πμ, Steven D'Aprano wrote:
Now, in languages like Python, Ruby, Java, and many others, there is no
table of memory addresses. Instead, there is a namespace, which is an
association between some name and some value:
global namespace:
x -- 23
y -- hello world
First
On 06/17/2013 05:34 AM, Simpleton wrote:
So is it safe to say that in Python a == a ? ( stands for memory address)
is the above correct?
It might be partially equivalent inside the interpreter, but it's not
something you should concern yourself with. And in general, no it's not
safe to say,
On 6/17/2013 7:34 AM, Simpleton wrote:
On 17/6/2013 9:51 πμ, Steven D'Aprano wrote:
Now, in languages like Python, Ruby, Java, and many others, there is no
table of memory addresses. Instead, there is a namespace, which is an
association between some name and some value:
global namespace:
On 17/6/2013 2:58 μμ, Michael Torrie wrote:
In python just think of assignment as making a name *be* an object. And
if you assign one name to another name, that makes both names be the
same object. When names are unbound (either they go out of scope or you
manually unbind them), the objects
On 17/6/2013 5:22 μμ, Terry Reedy wrote:
On 6/17/2013 7:34 AM, Simpleton wrote:
On 17/6/2013 9:51 πμ, Steven D'Aprano wrote:
Now, in languages like Python, Ruby, Java, and many others, there is no
table of memory addresses. Instead, there is a namespace, which is an
association between some
On Mon, Jun 17, 2013 at 11:55 AM, Simpleton supp...@superhost.gr wrote:
On 17/6/2013 5:22 μμ, Terry Reedy wrote:
On 6/17/2013 7:34 AM, Simpleton wrote:
On 17/6/2013 9:51 πμ, Steven D'Aprano wrote:
Now, in languages like Python, Ruby, Java, and many others, there is no
table of memory
On Mon, Jun 17, 2013 at 8:55 AM, Simpleton supp...@superhost.gr wrote:
On 17/6/2013 5:22 μμ, Terry Reedy wrote:
On 6/17/2013 7:34 AM, Simpleton wrote:
On 17/6/2013 9:51 πμ, Steven D'Aprano wrote:
Now, in languages like Python, Ruby, Java, and many others, there is no
table of memory
On 17/6/2013 7:23 μμ, Benjamin Kaplan wrote:
On Mon, Jun 17, 2013 at 8:55 AM, Simpleton supp...@superhost.gr wrote:
On 17/6/2013 5:22 μμ, Terry Reedy wrote:
On 6/17/2013 7:34 AM, Simpleton wrote:
On 17/6/2013 9:51 πμ, Steven D'Aprano wrote:
Now, in languages like Python, Ruby, Java, and
On 6/17/2013 1:17 PM, Νίκος wrote:
On Mon, Jun 17, 2013 at 8:55 AM, Simpleton supp...@superhost.gr wrote:
On 17/6/2013 5:22 μμ, Terry Reedy wrote:
When you interpret Python code, do you put data in locations with
integer addresses?
I lost you here.
Memory in biological brains is not a
On Mon, 17 Jun 2013 14:34:57 +0300, Simpleton wrote:
On 17/6/2013 9:51 πμ, Steven D'Aprano wrote:
Now, in languages like Python, Ruby, Java, and many others, there is no
table of memory addresses. Instead, there is a namespace, which is an
association between some name and some value:
Στις 18/6/2013 2:09 πμ, ο/η Steven D'Aprano έγραψε:
{a: Hello world}
Do you see a memory location there? There is no memory location. There is
the name, a, and the object it is associated with, Hello world.
Either the dict, or the string, may move around memory if the underlying
memory manager
On Tue, 18 Jun 2013 02:26:39 +0300, Νίκος wrote:
Στις 18/6/2013 2:09 πμ, ο/η Steven D'Aprano έγραψε:
{a: Hello world}
Do you see a memory location there? There is no memory location. There
is the name, a, and the object it is associated with, Hello world.
Either the dict, or the string, may
On 06/17/2013 08:41 PM, Steven D'Aprano wrote:
SNIP
In Python 3.2 and older, the data will be either UTF-4 or UTF-8, selected
when the Python compiler itself is compiled.
I think that was a typo. Do you perhaps UCS-2 or UCS-4
In Python 3.3, the data will
be stored in either Latin-1,
On Tue, 18 Jun 2013 00:41:53 +, Steven D'Aprano wrote:
In Python 3.2 and older, the data will be either UTF-4 or UTF-8,
selected when the Python compiler itself is compiled. In Python 3.3, the
data will be stored in either Latin-1, UTF-4, or UTF-8, depending on the
contents of the string.
On Mon, 17 Jun 2013 21:06:57 -0400, Dave Angel wrote:
On 06/17/2013 08:41 PM, Steven D'Aprano wrote:
SNIP
In Python 3.2 and older, the data will be either UTF-4 or UTF-8,
selected when the Python compiler itself is compiled.
I think that was a typo. Do you perhaps UCS-2 or UCS-4
On Tue, 18 Jun 2013 02:38:20 +, Steven D'Aprano wrote:
On Tue, 18 Jun 2013 00:41:53 +, Steven D'Aprano wrote:
In Python 3.2 and older, the data will be either UTF-4 or UTF-8,
selected when the Python compiler itself is compiled. In Python 3.3,
the data will be stored in either
While you said to me to forget about memory locations, and that's indeed
made things easy to follow i still keep wondering, how Python internally
keeping tracks of 'x' and 'y' names as well as their referenced objects
(i.e. number 6).
There is an excellent blog post about CPython
On 06/17/2013 10:42 PM, Steven D'Aprano wrote:
On Mon, 17 Jun 2013 21:06:57 -0400, Dave Angel wrote:
On 06/17/2013 08:41 PM, Steven D'Aprano wrote:
SNIP
In Python 3.2 and older, the data will be either UTF-4 or UTF-8,
selected when the Python compiler itself is compiled.
I think that
On Sat, 15 Jun 2013 19:18:53 +0300, Nick the Gr33k wrote:
In both situations we still have 2 memory units holding values, so hows
that different?
Consider that each named variable is a pointer to a memory location that
holds a value. This is one of the ways in that a typed compiled language
On 16/6/2013 9:32 πμ, Denis McMahon wrote:
On Sat, 15 Jun 2013 19:18:53 +0300, Nick the Gr33k wrote:
In both situations we still have 2 memory units holding values, so hows
that different?
Consider that each named variable is a pointer to a memory location that
holds a value. This is one of
On 16/6/2013 4:55 πμ, Tim Roberts wrote:
Nick the Gr33k supp...@superhost.gr wrote:
Because Python lets you use arbitrary values in a Boolean context, the net
result is exactly the same.
What is an arbitrary value? don even knwo what arbitrary means literally
in English.
In a long series
On Sun, 16 Jun 2013 11:07:12 +0300, Nick the Gr33k wrote:
On 16/6/2013 9:32 πμ, Denis McMahon wrote:
On Sat, 15 Jun 2013 19:18:53 +0300, Nick the Gr33k wrote:
In both situations we still have 2 memory units holding values, so
hows that different?
Consider that each named variable is a
On 16/6/2013 12:22 μμ, Denis McMahon wrote:
On Sun, 16 Jun 2013 11:07:12 +0300, Nick the Gr33k wrote:
On 16/6/2013 9:32 πμ, Denis McMahon wrote:
On Sat, 15 Jun 2013 19:18:53 +0300, Nick the Gr33k wrote:
In both situations we still have 2 memory units holding values, so
hows that different?
On Sun, Jun 16, 2013 at 10:59 AM, Nick the Gr33k supp...@superhost.gr wrote:
On 16/6/2013 12:22 μμ, Denis McMahon wrote:
For example, in Python
a = 6
b = a
c = 6
a and b point to one memory location that contains the value 6
c points to a different memory location that contains the value
On 16/06/2013 11:42, R. Michael Weylandt wrote:
Whats the difference of interpreting to compiling ?
If only it could be googled Alas, no one has ever written anything
about technology on the internet. Ironic that...
Michael
I'm very sorry but I don't understand the words googled
On Sun, 16 Jun 2013 12:59:00 +0300, Nick the Gr33k wrote:
Whats the difference of interpreting to compiling ?
OK, I give up!
--
Denis McMahon, denismfmcma...@gmail.com
--
http://mail.python.org/mailman/listinfo/python-list
On 16/6/2013 1:42 μμ, R. Michael Weylandt wrote:
I believe you are mistaken.
a here is not a pointer but variable,
which is a memory location that stores value 6.
b here is a pointer. It's value is the memory location of variable a which
stores value 6.
c here is just te same as a , a
On 16.06.2013 08:32, Denis McMahon wrote:
C:
int a, b;
b = 6;
a = b;
In C, this places the numeric value 6 into the memory location identified
by the variable b,
so far so good.
then copies the value from the location pointed to by b into the
location pointed to by a.
Wrong. Neither a
Nick the Gr33k writes:
On 16/6/2013 12:22 μμ, Denis McMahon wrote:
For example, in Python
a = 6
b = a
c = 6
a and b point to one memory location that contains the value 6
c points to a different memory location that contains the value 6
I believe you are mistaken.
a here is
On 16/06/2013 12:06, Ferrous Cranus wrote:
what id() does, never heard of that function before.
what google does, never heard of that function before.
--
Steve is going for the pink ball - and for those of you who are
watching in black and white, the pink is next to the green. Snooker
On Sun, Jun 16, 2013 at 12:06 PM, Ferrous Cranus supp...@superhost.gr wrote:
I appreciate you've returned to your Ferrous Cranus persona for this
interchange. It reminds me not to get hung up on concerns of
futility...
On 16/6/2013 1:42 μμ, R. Michael Weylandt wrote:
## CODE SNIPPET##
a =
Le 16.06.2013 13:06, Ferrous Cranus a écrit :
what id() does, never heard of that function before.
just type help(id) at Python prompt and stop flooding the group with
superfluous demands.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 16 Jun 2013 10:51:31 +, Denis McMahon wrote:
On Sun, 16 Jun 2013 12:59:00 +0300, Nick the Gr33k wrote:
Whats the difference of interpreting to compiling ?
OK, I give up!
Actually, that's a more subtle question than most people think. Python,
for example, is a compiled
On Sun, 16 Jun 2013 09:22:20 +, Denis McMahon wrote:
Python:
b = 6
a = b
In Python, this first puts the value 6 in in a memory location and
points b at that memory location, then makes a point to the same
memory location as b points to.
That may be true in some sense for CPython, the
On 16/6/2013 3:04 μμ, R. Michael Weylandt wrote:
On Sun, Jun 16, 2013 at 12:06 PM, Ferrous Cranus supp...@superhost.gr wrote:
I appreciate you've returned to your Ferrous Cranus persona for this
interchange. It reminds me not to get hung up on concerns of
futility...
On 16/6/2013 1:42 μμ, R.
On 16/6/2013 2:13 μμ, Jussi Piitulainen wrote:
If, instead of the above, you have
a = 6
b = a
b = 5
you will find that b == 5 and a == 6. So b is not the same as a. Else
one would have changed when the other changed. I would say that a and
b are different variables. They had the same value,
On Sun, Jun 16, 2013 at 2:38 PM, Ferrous Cranus supp...@superhost.gr wrote:
On 16/6/2013 3:04 μμ, R. Michael Weylandt wrote:
## CODE SNIPPET##
a = 552315251254
b = a
c = 552315251254
a is b # True _on my machine_
And this pattern continues for any sort of Python object.
a is c # False
On Sun, Jun 16, 2013 at 2:47 PM, Ferrous Cranus supp...@superhost.gr wrote:
On 16/6/2013 2:13 μμ, Jussi Piitulainen wrote:
If, instead of the above, you have
a = 6
b = a
b = 5
you will find that b == 5 and a == 6. So b is not the same as a. Else
one would have changed when the other
Whats the difference of interpreting to compiling ?
OK, I give up!
Actually, that's a more subtle question than most people think. Python,
for example, is a compiled language. (What did you think the c in
.pyc files stood for? and the compile() function?)
Careful there. This terminology
On Sun, 16 Jun 2013 12:31:59 -0700, Mark Janssen wrote:
Whats the difference of interpreting to compiling ?
OK, I give up!
Actually, that's a more subtle question than most people think. Python,
for example, is a compiled language. (What did you think the c in
.pyc files stood for? and
On Mon, Jun 17, 2013 at 6:02 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Sun, 16 Jun 2013 12:31:59 -0700, Mark Janssen wrote:
The line between compilers
and interpreters is quite fuzzy.
It shouldn't be.
Of course it should be, because that reflects reality.
It's
On 16/6/2013 9:53 μμ, R. Michael Weylandt wrote:
On Sun, Jun 16, 2013 at 2:47 PM, Ferrous Cranus supp...@superhost.gr wrote:
On 16/6/2013 2:13 μμ, Jussi Piitulainen wrote:
If, instead of the above, you have
a = 6
b = a
b = 5
you will find that b == 5 and a == 6. So b is not the same as a.
On 15/6/2013 8:27 πμ, Larry Hudson wrote:
On 06/14/2013 09:56 AM, Nick the Gr33k wrote:
On 14/6/2013 7:31 μμ, Steven D'Aprano wrote:
On Fri, 14 Jun 2013 16:07:56 +0300, Nick the Gr33k wrote:
Returning True is the same thing as returning a variable's truthy value?
NO! 'True' and 'False'
Nick the Gr33k supp...@superhost.gr writes:
On 15/6/2013 8:27 πμ, Larry Hudson wrote:
Also they do NOT return a variable's truthy value, they return the
variable itself.
No, as seen from my above examples, what is returned after the expr
eval are the actual variables' values, which in turn
On 15/6/2013 12:54 μμ, Lele Gaifax wrote:
Nick the Gr33k supp...@superhost.gr writes:
On 15/6/2013 8:27 πμ, Larry Hudson wrote:
Also they do NOT return a variable's truthy value, they return the
variable itself.
No, as seen from my above examples, what is returned after the expr
eval are
On 06/15/2013 07:07 AM, Nick the Gr33k wrote:
result = mylist (since its a no-emoty list)
result.append('bar')
result is mylist
True
Never seen the last statement before. What does that mean?
result is mylist
Yes. Surprisingling good question.
On 15/6/2013 6:53 μμ, Michael Torrie wrote:
On 06/15/2013 07:07 AM, Nick the Gr33k wrote:
result = mylist (since its a no-emoty list)
result.append('bar')
result is mylist
True
Never seen the last statement before. What does that mean?
result is mylist
Yes. Surprisingling good
On 06/15/2013 10:18 AM, Nick the Gr33k wrote:
a and b you say are names, which still are memory chunks
Yes no matter how you look at it, a dictionary of names and objects is
memory and variables in that sense. But at a higher level, we can
consider the differences with how a language like C
Nick the Gr33k supp...@superhost.gr wrote:
but i'm doing this all day long i just dont comprehend why it works this
way.
it doesn't make any sense to me.
It's just a rule you'll have to learn. The and and or operators in
Python simply do not return a boolean value. The expression a or b is
On Sat, 15 Jun 2013 18:55:05 -0700, Tim Roberts wrote:
Nick the Gr33k supp...@superhost.gr wrote:
but i'm doing this all day long i just dont comprehend why it works this
way. it doesn't make any sense to me.
It's just a rule you'll have to learn. The and and or operators in
Python simply
On 14/6/2013 4:14 πμ, Steven D'Aprano wrote:
On Thu, 13 Jun 2013 17:26:18 +0300, Νικόλαος Κούρας wrote:
i just want 4 cases to examine so correct execute to be run:
i'm reading and reading and reading this all over:
if '-' not in ( name and month and year ):
and i cant comprehend it.
On Fri, Jun 14, 2013 at 6:03 PM, Nick the Gr33k supp...@superhost.gr wrote:
print(name or month or year)
print(k in (name and month and year))
Seriously, you can't see the difference between those lines? Either
you're trolling - which is still a distinct possibility, but so is the
converse - or
On Fri, Jun 14, 2013 at 9:03 AM, Nick the Gr33k supp...@superhost.gr wrote:
name=abcd
month=efgh
year=ijkl
print(name or month or year)
abcd
Can understand that, it takes the first string out of the 3 strings that has
a truthy value.
print(k in (name and month and year))
True
No
On Fri, Jun 14, 2013 at 9:24 AM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
On Fri, Jun 14, 2013 at 9:03 AM, Nick the Gr33k supp...@superhost.gr wrote:
No clue. since the expression in parenthesis returns 'abcd' how can 'k'
contained within 'abcd' ?
No it's not. See both above
Nick the Gr33k writes:
name=abcd
month=efgh
year=ijkl
print(name or month or year)
abcd
Can understand that, it takes the first string out of the 3 strings
that has a truthy value.
print(k in (name and month and year))
True
No clue. since the expression in parenthesis
On 14 Jun 2013 09:09, Nick the Gr33k supp...@superhost.gr wrote:
print(name and month and year)
ijkl
Seems here is returning the last string out of 3 strings, but have no
clue why Python doing this.
You have been told this above.
All languages kind of do that. Ever seen this command on a
On 14/6/2013 11:28 πμ, Jussi Piitulainen wrote:
'Parker' and 'May' and '2001'
'2001'
But why?
that expression should return True since all stings are not empty.
Either way, the interactive prompt is your friend.
--
What is now proved was at first only imagined!
--
On Fri, Jun 14, 2013 at 6:41 PM, Nick the Gr33k supp...@superhost.gr wrote:
On 14/6/2013 11:28 πμ, Jussi Piitulainen wrote:
'Parker' and 'May' and '2001'
'2001'
But why?
that expression should return True since all stings are not empty.
It does. Not the bool value, but it does return a
On 14/6/2013 11:03 πμ, Nick the Gr33k wrote:
On 14/6/2013 4:14 πμ, Steven D'Aprano wrote:
On Thu, 13 Jun 2013 17:26:18 +0300, Νικόλαος Κούρας wrote:
i just want 4 cases to examine so correct execute to be run:
i'm reading and reading and reading this all over:
if '-' not in ( name and month
On Fri, Jun 14, 2013 at 6:44 PM, Nick the Gr33k supp...@superhost.gr wrote:
Someone want to explain this?
Stop writing. Start reading. It has been explained. In the course of a
long and adventurous thread in the principal European courts, it has
been revealed to you that ...
Fill in whatever
On 14 Jun 2013 09:51, Nick the Gr33k supp...@superhost.gr wrote:
On 14/6/2013 11:28 πμ, Jussi Piitulainen wrote:
'Parker' and 'May' and '2001'
'2001'
But why?
that expression should return True since all stings are not empty.
Either way, the interactive prompt is your friend.
At
On 14/6/2013 11:57 πμ, Chris Angelico wrote:
On Fri, Jun 14, 2013 at 6:44 PM, Nick the Gr33k supp...@superhost.gr wrote:
Someone want to explain this?
Stop writing. Start reading. It has been explained. In the course of a
long and adventurous thread in the principal European courts, it has
On 14 Jun 2013 09:56, Nick the Gr33k supp...@superhost.gr wrote:
On 14/6/2013 11:03 πμ, Nick the Gr33k wrote:
On 14/6/2013 4:14 πμ, Steven D'Aprano wrote:
On Thu, 13 Jun 2013 17:26:18 +0300, Νικόλαος Κούρας wrote:
i just want 4 cases to examine so correct execute to be run:
i'm reading
On Fri, Jun 14, 2013 at 7:00 PM, Nick the Gr33k supp...@superhost.gr wrote:
but i really wont to understand how 'or' and 'and' works inside an
expression. please answer my previous post if you know.
*eyeroll*
You have all the information. Go play with it in the interactive
interpreter until
Nick the Gr33k writes:
On 14/6/2013 11:28 πμ, Jussi Piitulainen wrote:
'Parker' and 'May' and '2001'
'2001'
But why?
that expression should return True since all stings are not empty.
It returns a value that counts as true in a conditional statement or
expression:
if '2001':
On 14/6/2013 12:21 μμ, Jussi Piitulainen wrote:
Nick the Gr33k writes:
On 14/6/2013 11:28 πμ, Jussi Piitulainen wrote:
'Parker' and 'May' and '2001'
'2001'
But why?
that expression should return True since all stings are not empty.
It returns a value that counts as true in a
On 14/6/2013 12:12 μμ, Chris Angelico wrote:
On Fri, Jun 14, 2013 at 7:00 PM, Nick the Gr33k supp...@superhost.gr wrote:
but i really wont to understand how 'or' and 'and' works inside an
expression. please answer my previous post if you know.
*eyeroll*
You have all the information. Go play
On Wed, 12 Jun 2013 11:54:25 +0300, Νικόλαος Κούρας wrote:
So, i must tell:
for i, month in enumerate(months):
print('option value=%s %s /option' % (i, month) )
to somehow return '==' instead of 0 but don't know how.
You could test for (month == 0) instead of re.search('=',
On 14/6/2013 3:03 μμ, Denis McMahon wrote:
for i, month in enumerate(months):
if i != 0:
print('option value=%s %s /option' % (i, month) )
else:
print('option value=%s %s /option' % (==, month) )
This s exactly what i was looking for Denis, thank you.
I tough of that
Nick the Gr33k writes:
On 14/6/2013 12:21 μμ, Jussi Piitulainen wrote:
Nick the Gr33k writes:
On 14/6/2013 11:28 πμ, Jussi Piitulainen wrote:
'Parker' and 'May' and '2001'
'2001'
But why?
that expression should return True since all stings are not empty.
It returns a value
On 14/6/2013 3:40 μμ, Jussi Piitulainen wrote:
Nick the Gr33k writes:
On 14/6/2013 12:21 μμ, Jussi Piitulainen wrote:
Nick the Gr33k writes:
On 14/6/2013 11:28 πμ, Jussi Piitulainen wrote:
'Parker' and 'May' and '2001'
'2001'
But why?
that expression should return True since all stings
:
On 14 June 2013 09:07, Nick the Gr33k supp...@superhost.gr wrote:
Thanks for explaining this but i cannot follow its logic at all.
My mind is stuck trying to interpret it as an English sentence:
if ('Parker' and 'May' and '2001')
if ('Parker' or 'May' or '2001')
i just don't get it and
On Jun 14, 6:48 pm, Zero Piraeus sche...@gmail.com wrote:
:
On 14 June 2013 09:07, Nick the Gr33k supp...@superhost.gr wrote:
Thanks for explaining this but i cannot follow its logic at all.
My mind is stuck trying to interpret it as an English sentence:
if ('Parker' and 'May' and
On 14/6/2013 4:48 μμ, Zero Piraeus wrote:
:
On 14 June 2013 09:07, Nick the Gr33k supp...@superhost.gr wrote:
Thanks for explaining this but i cannot follow its logic at all.
My mind is stuck trying to interpret it as an English sentence:
if ('Parker' and 'May' and '2001')
if ('Parker' or
On 2013-06-14, Nick the Gr33k supp...@superhost.gr wrote:
Well i do not understand it.
Yea. We know.
--
Grant Edwards grant.b.edwardsYow! I feel like a wet
at parking meter on Darvon!
1 - 100 of 166 matches
Mail list logo