print 3000中的print()返回值? [英] print() in Python 3000 return value?

查看:79
本文介绍了print 3000中的print()返回值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在PEP 3000中注意到打印将成为一种功能。 PEP

引用一个线程,Guido解释了这个决定。线程确实没有指定函数返回的内容。这已经决定了吗?

I noticed in PEP 3000 that print will become a function. The PEP
references a thread where Guido explains this decision. The thread does
not specify what the function will return. Has this been decided?

推荐答案

James Thiele写道:
James Thiele wrote:
我在PEP 3000中注意到打印将会成为一个功能。 PEP
引用了一个线索,Guido解释了这个决定。该线程没有指定函数将返回的内容。这已经决定了?
I noticed in PEP 3000 that print will become a function. The PEP
references a thread where Guido explains this decision. The thread does
not specify what the function will return. Has this been decided?




我的直觉是它应该是一个程序(即返回None)。


做什么你希望它回来吗?


问候,

马丁



My intuition is that it should be a procedure (i.e. returning None).

What do you want it to return?

Regards,
Martin


Martin chimedin:
Martin chimedin:
James Thiele写道:
James Thiele wrote:
我在PEP 3000中注意到打印将成为一个功能。 PEP
引用了一个线索,Guido解释了这个决定。该线程没有指定函数将返回的内容。这已经决定了吗?
I noticed in PEP 3000 that print will become a function. The PEP
references a thread where Guido explains this decision. The thread does
not specify what the function will return. Has this been decided?



我的直觉是它应该是一个程序(即返回None)。
你想要它返回什么?
Martin



My intuition is that it should be a procedure (i.e. returning None).
What do you want it to return?

Regards,
Martin




打印的字符串。它可能在实验中很有用:


message ="我不需要看到所有这些:%s" %print(s)



The string that was printed. It could be useful inside expessions:

message = "I don''t need to see all of this:%s" % print(s)


Em Dom,2006-04-02?* s 10:41 -0700,James Thiele escreveu:
Em Dom, 2006-04-02 ?*s 10:41 -0700, James Thiele escreveu:
Martin chimedin:
Martin chimedin:
James Thiele写道:
James Thiele wrote:
我在PEP 3000中注意到打印将成为一个功能。 PEP
引用了一个线索,Guido解释了这个决定。该线程没有指定函数将返回的内容。这已经决定了吗?
I noticed in PEP 3000 that print will become a function. The PEP
references a thread where Guido explains this decision. The thread does
not specify what the function will return. Has this been decided?



我的直觉是它应该是一个程序(即返回None)。
你想要它返回什么?
Martin



My intuition is that it should be a procedure (i.e. returning None).
What do you want it to return?

Regards,
Martin



打印的字符串。它可能在实验中很有用:

message ="我不需要看到所有这些:%s" %print(s)



The string that was printed. It could be useful inside expessions:

message = "I don''t need to see all of this:%s" % print(s)




或者也许:


依次为我:

mylist .append(print(i))


-

Felipe。



Or maybe:

for i in sequence:
mylist.append(print(i))

--
Felipe.


这篇关于print 3000中的print()返回值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆