Paul,
Thanks. This helped.
Jianbing
On Aug 14, 4:10 pm, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 14 Aug, 22:43, [EMAIL PROTECTED] wrote:
>
>
>
> > Traceback (most recent call last):
> > File "", line 1, in
> > File "/sea/local/lib/python2.5/site-packages/libxml2.py", line 1, in
> >
> >
Hi,
I have this weird situation where on the same machine(solaris 8,
python 2.5), one user can do this with no problem:
>>> import libxml2
>>> libxml2
>>>
While the another one get this:
>>> import libxml2
Traceback (most recent call last):
File "", line 1, in
File "/sea/local/lib/python2
I ran into a similar situation like the following (ipython session).
Can anyone please explain why the behavior?
Thanks in advance.
In [11]: def foo(b=[]):
: b.append(3)
: return b
:
In [12]: foo()
Out[12]: [3]
In [13]: foo()
Out[13]: [3, 3]
In [14]: foo([])
Out[14]
On May 4, 5:14 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> On Fri, 2007-05-04 at 14:30 -0700, [EMAIL PROTECTED] wrote:
> > Hi,
>
> > Can anyone explain the following:
>
> > Python 2.5 (r25:51908, Apr 9 2007, 11:27:23)
> > [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
> > Type "help", "copyri
Hi,
Can anyone explain the following:
Python 2.5 (r25:51908, Apr 9 2007, 11:27:23)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def foo():
... x = 2
...
>>> foo()
>>> def bar():
... x[2] = 2
...
>>>
>>> bar()