内置集文字 [英] builtin set literal
问题描述
你好,
lst = list((1,2,3))
lst = [1,2,3]
t = tupel((1,2,3))
t =(1,2,3)
s = set( (1,2,3))
s = ...
为套装类型设置内置文字将是一个不错的功能
可能在P3 ...怎么样?
s =< 1,2,3>
问候,Daniel
Hello,
lst = list((1,2,3))
lst = [1,2,3]
t = tupel((1,2,3))
t = (1,2,3)
s = set((1,2,3))
s = ...
it would be nice feature to have builtin literal for set type
maybe in P3 .. what about?
s = <1,2,3>
Regards, Daniel
推荐答案
2月14日上午11:55,SchüleDaniel< u ... @ rz.uni-karlsruhe.dewrote:
On Feb 14, 11:55 am, Schüle Daniel <u...@rz.uni-karlsruhe.dewrote:
你好,
lst = list((1,2,3))
lst = [1,2,3]
t = tupel((1,2,3))
t =(1,2,3)
s =设置((1,2,3))
s = ...
设置类型的内置文字将是一个很好的功能
也许在P3 ...怎么样?
s =< 1,2,3>
问候,Daniel
Hello,
lst = list((1,2,3))
lst = [1,2,3]
t = tupel((1,2,3))
t = (1,2,3)
s = set((1,2,3))
s = ...
it would be nice feature to have builtin literal for set type
maybe in P3 .. what about?
s = <1,2,3>
Regards, Daniel
套不是那么有用或常见。只需使用一个列表。
和''<''和''>''已经有语法含义。
这会使python看起来更像C ++,没有人想要的。
sets aren''t quite that useful or common. just use a list.
and ''<'' and ''>'' already have syntactic meanings.
and that would make python look more like C++, which nobody wants.
SchüleDaniel写道:
Schüle Daniel wrote:
你好,
lst = list((1,2,3))
lst = [1,2,3]
t = tupel ((1,2,3))
t =(1,2,3)
s = set((1,2,3))
s = ...
为套装类型设置内置文字将是一个很好的功能
也许在P3 ...怎么样?
s =< 1,2,3>
Hello,
lst = list((1,2,3))
lst = [1,2,3]
t = tupel((1,2,3))
t = (1,2,3)
s = set((1,2,3))
s = ...
it would be nice feature to have builtin literal for set type
maybe in P3 .. what about?
s = <1,2,3>
在Python 3.0中,这看起来像::
s = {1,2,3}
这里有更多信息:
http://www.python.org/dev/peps/pep-3100/
STeVe
In Python 3.0, this looks like::
s = {1,2,3}
More info here:
http://www.python.org/dev/peps/pep-3100/
STeVe
>
faulkner schrieb:
faulkner schrieb:
2月14日上午11:55,SchüleDaniel< u ... @ rz.uni-karlsruhe.dewrote:
On Feb 14, 11:55 am, Schüle Daniel <u...@rz.uni-karlsruhe.dewrote:
>你好,
lst = list((1,2,3))
lst = [1,2, 3]
t = tupel((1,2,3))
t =(1,2,3)
s = set((1, 2,3))
s = ...
对于设置类型内置文字可能是很好的功能
也许在P3 ..怎么样?
s =< 1,2,3>
问候,Daniel
>Hello,
lst = list((1,2,3))
lst = [1,2,3]
t = tupel((1,2,3))
t = (1,2,3)
s = set((1,2,3))
s = ...
it would be nice feature to have builtin literal for set type
maybe in P3 .. what about?
s = <1,2,3>
Regards, Daniel
套装并不是那么有用或常见。只需使用一个列表。
和''<''和''>''已具有句法含义。
sets aren''t quite that useful or common. just use a list.
and ''<'' and ''>'' already have syntactic meanings.
好吧,我想到这个
空集<有意思!=现在
据我记得是< depricated并将消失
当他们在P3000中消失时,<可以重新用作空集。
well, I thought about this
the empty set <has the meaning of != now
as far as I remember is <depricated and will disappear
When they are gone in P3000, <could be reused as empty set.
,这将使python看起来更像C ++,没人想要。
and that would make python look more like C++, which nobody wants.
我不认为实际上很多人都担心这个问题。
我们有{}用于dicts,我怀疑是否有人误以为他们是C ++ brakets。
在我的previuos帖子中我忘了提到
d = dict()
d = {}
s = set()
s =<>
为什么不呢,第一眼看到每个人都会看到..这里我们的
算法处理独特的东西/物品...放在一套。
问候,Daniel
I dont think that actually many people fear this.
we have {} for dicts and I doubt anybody mistake them for C++ brakets.
In my previuos post I forgot to mention
d = dict()
d = {}
s = set()
s = <>
why not, on the first sight everybody will see ... here our
algorithmus deals with unique things/objects ... put in a set.
Regards, Daniel
这篇关于内置集文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!