On Thu, Apr 26, 2012 at 3:48 PM, John Nagle wrote:
> This assumes that everything is, internally, an object. In CPython,
> that's the case, because Python is a naive interpreter and everything,
> including numbers, is "boxed". That's not true of PyPy or Shed Skin.
> So does "is" have to force
On 4/25/2012 5:01 PM, Steven D'Aprano wrote:
On Wed, 25 Apr 2012 13:49:24 -0700, Adam Skutt wrote:
Though, maybe it's better to use a different keyword than 'is' though,
due to the plain English
connotations of the term; I like 'sameobj' personally, for whatever
little it matters. Really, I th
deuteros, 26.04.2012 05:08:
> I'm fairly new to Python I have version 2.7 installed on my computer. However
> my professor wants us all to use the latest version of Python.
Did he/she explicitly tell you to install Python 3? 2.7 is the latest
version of Python 2.x, some people may mix that up.
O
Neil Cerutti wrote:
>Is there an explanation or previous dicussion somewhere for the
>following behavior? I haven't yet trolled the csv mailing list
>archive, though that would probably be a good place to check.
>
>Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit
>(Intel)] on win
On Thu, Apr 26, 2012 at 1:50 PM, Adam Skutt wrote:
> On Apr 25, 8:01 pm, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote:
>> 2) The "is" operator always has the exact same semantics and cannot be
>> overridden. The id() function can be monkey-patched.
>
> I can't see how that's useful at a
On Apr 25, 8:01 pm, Steven D'Aprano wrote:
> On Wed, 25 Apr 2012 13:49:24 -0700, Adam Skutt wrote:
> > Though, maybe it's better to use a different keyword than 'is' though,
> > due to the plain English
> > connotations of the term; I like 'sameobj' personally, for whatever
> > little it matters.
What operating system are you running?
Cheers,
Xav
On 26 April 2012 13:08, deuteros wrote:
> I'm fairly new to Python I have version 2.7 installed on my computer.
> However
> my professor wants us all to use the latest version of Python. How do I go
> about upgrading? Do I just install the ne
I'm fairly new to Python I have version 2.7 installed on my computer. However
my professor wants us all to use the latest version of Python. How do I go
about upgrading? Do I just install the new version? Do I have to do anything
with the old version already installed?
--
http://mail.python.org
In article <4f9833ff$0$29965$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Wed, 25 Apr 2012 13:42:31 +0200, Thomas Rachel wrote:
>
> > Two objects can be equal (=) without being identical (â¡), but not the
> > other way.
>
>
> >>> x = float('nan')
> >>> y = x
> >>> x is y
On Wed, 25 Apr 2012 13:49:24 -0700, Adam Skutt wrote:
> Though, maybe it's better to use a different keyword than 'is' though,
> due to the plain English
> connotations of the term; I like 'sameobj' personally, for whatever
> little it matters. Really, I think taking away the 'is' operator
> alto
I want to take this opportunity to make folks aware of several Python 3
porting initiatives and resources.
In Ubuntu 12.10, we are going to be making a big push to target all the
applications and libraries on the desktop CDs to Python 3. While this is a
goal of Ubuntu, the intent really is to wor
On 4/25/2012 4:49 PM, Adam Skutt wrote:
Identity and equality are distinct concepts in programming languages.
There's nothing that can be done about that, and no particularly good
reason to force certain language behaviors because some "programmers"
have difficulty with the distinction.
Though,
On 4/25/2012 4:05 PM, Frank Miles wrote:
I have an exceedingly simple function that does a "named import".
It works perfectly for one file "r"- and fails for the second "x".
If I reverse the order of being called, it is still "x" that fails,
and "r" still succeeds.
os.access() always reports th
On 4/25/2012 22:05, Frank Miles wrote:
I have an exceedingly simple function that does a "named import".
It works perfectly for one file "r"- and fails for the second "x".
If I reverse the order of being called, it is still "x" that fails,
and "r" still succeeds.
os.access() always reports that
On Apr 25, 10:38 am, Nobody wrote:
> On Mon, 23 Apr 2012 10:01:24 -0700, Paul Rubin wrote:
> >> I can't think of a single case where 'is' is ill-defined.
>
> > If I can't predict the output of
>
> > print (20+30 is 30+20) # check whether addition is commutative print
> > (20*30 is 30*20)
On Wed, Apr 25, 2012 at 1:05 PM, Frank Miles wrote:
> I have an exceedingly simple function that does a "named import".
> It works perfectly for one file "r"- and fails for the second "x".
>
> If I reverse the order of being called, it is still "x" that fails,
> and "r" still succeeds.
>
> os.acc
I have an exceedingly simple function that does a "named import".
It works perfectly for one file "r"- and fails for the second "x".
If I reverse the order of being called, it is still "x" that fails,
and "r" still succeeds.
os.access() always reports that the file is readable (i.e. "true")
If I
> >> Then nested calls like
> >>
> >> a = [].append('x').append('y').append('z')
>
> Sequential appends are nearly always done within a loop.
If not in a loop and you have multiple things already in an
iterable (or create the iterable inline) you can use extend
a= []
a.extend( [ 'x, 'y, 'z' ] )
On 2012-04-25, Kiuhnm wrote:
> On 4/25/2012 20:05, Neil Cerutti wrote:
>> Is there an explanation or previous dicussion somewhere for the
>> following behavior? I haven't yet trolled the csv mailing list
>> archive, though that would probably be a good place to check.
>>
>> Python 3.2 (r32:88445,
On 4/25/2012 20:05, Neil Cerutti wrote:
Is there an explanation or previous dicussion somewhere for the
following behavior? I haven't yet trolled the csv mailing list
archive, though that would probably be a good place to check.
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit
(I
Is there an explanation or previous dicussion somewhere for the
following behavior? I haven't yet trolled the csv mailing list
archive, though that would probably be a good place to check.
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit
(Intel)] on win 32
Type "help", "copyright",
On Thu, Apr 26, 2012 at 3:27 AM, Steven D'Aprano
wrote:
> By the way, in mathematics, ≡ normally means "is equivalent to", which is
> not quite the same as "identical to".
That's perhaps because, in mathematics, nobody would even think of
asking if this 4 is the same as that 4. What sort of quest
On Wed, 25 Apr 2012 13:42:31 +0200, Thomas Rachel wrote:
> Two objects can be equal (=) without being identical (≡), but not the
> other way.
>>> x = float('nan')
>>> y = x
>>> x is y
True
>>> x == y
False
By the way, in mathematics, ≡ normally means "is equivalent to", which is
not quite the
On Mon, 23 Apr 2012 10:01:24 -0700, Paul Rubin wrote:
>> I can't think of a single case where 'is' is ill-defined.
>
> If I can't predict the output of
>
> print (20+30 is 30+20) # check whether addition is commutative print
> (20*30 is 30*20) # check whether multiplication is commutat
Am 24.04.2012 15:25 schrieb rusi:
Identity, sameness, equality and the verb to be are all about the same
concept(s) and their definitions are *intrinsically* circular; see
http://plato.stanford.edu/entries/identity/#2
Mybe in real life language. In programming and mathematics there are
severa
叶佑群 wrote:
Hi, all
I have code as:
/pobj = subprocess.Popen (["smbpasswd", user], stdin
=subprocess.PIPE)
password += "\n"
pobj.stdin.write (password)
pobj.stdin.write (password)/
the command smbpasswd will change the samba user's passwor
On Wed, Apr 25, 2012 at 12:21 PM, 叶佑群 wrote:
> Hi, all
>
> I have code as:
>
> pobj = subprocess.Popen (["smbpasswd", user], stdin
> =subprocess.PIPE)
> password += "\n"
> pobj.stdin.write (password)
> pobj.stdin.write (password)
>
> the comma
ANNOUNCING
eGenix.com mx Base Distribution
Version 3.2.4 for Python 2.4 - 2.7
Open Source Python extensions providing
important and useful services
John Nagle wrote:
> On 4/22/2012 12:39 PM, mambokn...@gmail.com wrote:
>> Question:
>> How can I access to the global 'a' in file_2 without resorting to the
>> whole name 'file_1.a' ?
>
> Actually, it's better to use the fully qualified name "file_1.a".
> Using "import *" brings in everythin
http://yellow937.webs.com/
--
http://mail.python.org/mailman/listinfo/python-list
30 matches
Mail list logo