2006年12月28日 星期四 08:49
小妹打了几行,很奇怪为什么w/q的结果是4L而不是4? >>> q=2**1002 >>> w=2**1004 >>> w/q 4L
2006年12月28日 星期四 08:51
大哥告诉你,参与运算的有一个是L,结果就是L. 2006/12/28, linda. s <samrobertsmith在gmail.com>: > > 小妹打了几行,很奇怪为什么w/q的结果是4L而不是4? > >>> q=2**1002 > >>> w=2**1004 > >>> w/q > 4L > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- 一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20061228/e2b55ceb/attachment.html
2006年12月28日 星期四 09:35
L是什么意思?对不起,基础很薄弱. On 12/27/06, Hope <lanyig在gmail.com> wrote: > 大哥告诉你,参与运算的有一个是L,结果就是L. > > 2006/12/28, linda. s <samrobertsmith在gmail.com>: > > > > 小妹打了几行,很奇怪为什么w/q的结果是4L而不是4? > > >>> q=2**1002 > > >>> w=2**1004 > > >>> w/q > > 4L > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese >
2006年12月28日 星期四 09:39
L表示Long Python的int和long int可以自动转换。不过这种自动是单向的,也就是只能从int到Long On 12/27/06, linda. s <samrobertsmith在gmail.com> wrote: > L是什么意思?对不起,基础很薄弱. > > On 12/27/06, Hope <lanyig在gmail.com> wrote: > > 大哥告诉你,参与运算的有一个是L,结果就是L. > > > > 2006/12/28, linda. s <samrobertsmith在gmail.com>: > > > > > > 小妹打了几行,很奇怪为什么w/q的结果是4L而不是4? > > > >>> q=2**1002 > > > >>> w=2**1004 > > > >>> w/q > > > 4L > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese
2006年12月28日 星期四 09:42
On 12/28/06, linda. s <samrobertsmith在gmail.com> wrote: > L是什么意思?对不起,基础很薄弱. > long integer -- I like python! UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad My Blog: http://www.donews.net/limodou
2006年12月28日 星期四 09:42
这个基础的基础就不是mail list的用处了,你得自己去看书了. 2006/12/28, linda. s <samrobertsmith在gmail.com>: > > L是什么意思?对不起,基础很薄弱. > > On 12/27/06, Hope <lanyig在gmail.com> wrote: > > 大哥告诉你,参与运算的有一个是L,结果就是L. > > > > 2006/12/28, linda. s <samrobertsmith在gmail.com>: > > > > > > 小妹打了几行,很奇怪为什么w/q的结果是4L而不是4? > > > >>> q=2**1002 > > > >>> w=2**1004 > > > >>> w/q > > > 4L > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- 一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20061228/3a05740e/attachment.htm
2006年12月28日 星期四 09:51
Integer literals with an "L" or "l" suffix yield long integers ("L" is preferred because "1l" looks too much like eleven!).
这个在Python Library Reference的3. Built-in Types 的3.4 Numeric Types -- int, float, long, complex 里面有详细的讲解和说明。
--------------------------------------------------
Liu Xing
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
8/F., Civil Defense Building, No.189 Guangzhou Road,
Nanjing, 210029, China
TEL: +86+25-86630566-836
COINS: 79955-836
FAX: +86+25-83317685
MAIL: liuxing在nanjing-fnst.com
--------------------------------------------------
----- Original Message -----
From: Hope
To: python-chinese在lists.python.cn
Sent: Thursday, December 28, 2006 9:42 AM
Subject: Re: [python-chinese] 结果是4L而不是4?
这个基础的基础就不是mail list的用处了,你得自己去看书了.
2006/12/28, linda. s <samrobertsmith在gmail.com>:
L是什么意思?对不起,基础很薄弱.
On 12/27/06, Hope <lanyig在gmail.com> wrote:
> 大哥告诉你,参与运算的有一个是L,结果就是L.
>
> 2006/12/28, linda. s <samrobertsmith在gmail.com>:
> >
> > 小妹打了几行,很奇怪为什么w/q的结果是4L而不是4?
> > >>> q=2**1002
> > >>> w=2**1004
> > >>> w/q
> > 4L
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to
> python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> > Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to
> python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to
> python-chinese-request在lists.python.cn
> Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
>
_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese
------------------------------------------------------------------------------
_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
一个HTML附件被移除...
URL: http://python.cn/pipermail/python-chinese/attachments/20061228/87bc6388/attachment.html
2006年12月28日 星期四 10:09
为啥不先去google一下或查查手册? >小妹打了几行,很奇怪为什么w/q的结果是4L而不是4? >> > > q=2**1002 >> > > w=2**1004 >> > > w/q >4L
Zeuux © 2025
京ICP备05028076号