Python论坛  - 讨论区

标题:[python-chinese] how to add pairs to a dict?

2004年03月12日 星期五 16:41

Anthony Liu antonyliu2002 at yahoo.com
Fri Mar 12 16:41:30 HKT 2004

I want to keep adding pairs my phone_book dict like
so:

phone_book={'jack':2313, 'john':3436}

And then each time when a new pair is created, for
example, 'tom':5678, I want to add it to the dict so
that the dict becomes 

phone_book={'jack':2313, 'john':3436, 'tom':5678}


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年03月12日 星期五 16:46

0.706 0.706 at 163.com
Fri Mar 12 16:46:31 HKT 2004

QW50aG9ueSBMaXUsxPq6w6OhDQoNCgkgIHBob25lX2Jvb2tbJ3RvbSddPTU2NzgNCg0KPT09PT09
PSAyMDA0LTAzLTEyIDE2OjQxOjMwIMT61NrAtNDF1tDQtLXAo7o9PT09PT09DQoNCj5JIHdhbnQg
dG8ga2VlcCBhZGRpbmcgcGFpcnMgbXkgcGhvbmVfYm9vayBkaWN0IGxpa2UNCj5zbzoNCj4NCj5w
aG9uZV9ib29rPXsnamFjayc6MjMxMywgJ2pvaG4nOjM0MzZ9DQo+DQo+QW5kIHRoZW4gZWFjaCB0
aW1lIHdoZW4gYSBuZXcgcGFpciBpcyBjcmVhdGVkLCBmb3INCj5leGFtcGxlLCAndG9tJzo1Njc4
LCBJIHdhbnQgdG8gYWRkIGl0IHRvIHRoZSBkaWN0IHNvDQo+dGhhdCB0aGUgZGljdCBiZWNvbWVz
IA0KPg0KPnBob25lX2Jvb2s9eydqYWNrJzoyMzEzLCAnam9obic6MzQzNiwgJ3RvbSc6NTY3OH0N
Cj4NCj4NCj5fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQo+RG8geW91IFlhaG9v
IT8NCj5ZYWhvbyEgU2VhcmNoIC0gRmluZCB3aGF0IHlvdZJyZSBsb29raW5nIGZvciBmYXN0ZXIN
Cj5odHRwOi8vc2VhcmNoLnlhaG9vLmNvbQ0KPg0KPl9fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fDQo+cHl0aG9uLWNoaW5lc2UgbGlzdA0KPnB5dGhvbi1jaGlu
ZXNlQGxpc3RzLnB5dGhvbi5jbg0KPmh0dHA6Ly9weXRob24uY24vbWFpbG1hbi9saXN0aW5mby9w
eXRob24tY2hpbmVzZQ0KDQo9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0N
CgkJCQ0KDQqhoaGhoaGhoaGhoaGhoaGh1sINCsDxo6ENCiANCgkJCQkgDQqhoaGhoaGhoaGhoaGh
oaGhMC43MDYNCqGhoaGhoaGhoaGhoaGhoaEwLjcwNkAxNjMuY29tDQqhoaGhoaGhoaGhoaGhoaGh
oaGhoTIwMDQtMDMtMTINCg0K



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年03月12日 星期五 16:48

Zoom.Quiet zoomq at infopro.cn
Fri Mar 12 16:48:16 HKT 2004

Hello Anthony,

²»ÄÜʹÓÃÕâÑùµÄdict °É£¡
»»ÆäËüµÄÊý¾Ý½á¹¹°É£¡

=== [ 16:41 ; 04-03-12 ] you wrote:

AL> I want to keep adding pairs my phone_book dict like
AL> so:

AL> phone_book={'jack':2313, 'john':3436}

AL> And then each time when a new pair is created, for
AL> example, 'tom':5678, I want to add it to the dict so
AL> that the dict becomes 

AL> phone_book={'jack':2313, 'john':3436, 'tom':5678}


AL> __________________________________
AL> Do you Yahoo!?
AL> Yahoo! Search - Find what you’re looking for faster
AL> http://search.yahoo.com

=== === === === === === === === === === 

-- 
Best regards,
 Zoom.Quiet                            

 /=======================================\
]Time is unimportant, only life important![
 \=======================================/



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年03月12日 星期五 16:55

Jacob Fan jacob at exoweb.net
Fri Mar 12 16:55:32 HKT 2004

我的想法和Zoom.Quiet类似。从鼓励大家创造的角度来看,这样才是最好的。默认状态是每个人都可以改。同时有些页面创建者可以将限制其修改权限(例如每个人自己的个人信息页就可以设置成自己可以编辑,其他人可以加评论的模式)
-----Original Message-----
From: Zoom.Quiet [mailto:zoomq at infopro.cn] 
Sent: 2004年3月12日 16:46
To: python-chinese at lists.python.cn
Subject: Re[4]: [python-chinese] 关于Wiki


Hello Jacob,

哎呀呀!大家忘了Wiki 的基本功能了?可以随时追溯的!
其实最自然的是注册用户拥有所有功能,让Wiki 开发的理念感化所有用户,
所有编辑者都是高尚的,负责的!
自然,会对自个儿的文字负责!

理想的,应该是所有注册用户(列表注册过的)可以进行所有操作!

考虑周到一些,
那未就要指定一定的兴趣分类,象BBS一样各有斑竹,负责维护正式文章,
比如说所有"python_cn" 为前缀,或是后缀的页面,只能由指定用户进行编辑,但是大家都可以评论,
而其它的页面则可以任意编辑!



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年03月12日 星期五 18:30

Anthony Liu antonyliu2002 at yahoo.com
Fri Mar 12 18:30:20 HKT 2004

是的,不用了。

--- "Zoom.Quiet" <zoomq at infopro.cn> wrote:
> Hello Anthony,
> 
>
不能使用这样的dict
吧!
>
换其它的数据结构吧!
> 
> === [ 16:41 ; 04-03-12 ] you wrote:
> 
> AL> I want to keep adding pairs my phone_book dict
> like
> AL> so:
> 
> AL> phone_book={'jack':2313, 'john':3436}
> 
> AL> And then each time when a new pair is created,
> for
> AL> example, 'tom':5678, I want to add it to the
> dict so
> AL> that the dict becomes 
> 
> AL> phone_book={'jack':2313, 'john':3436,
> 'tom':5678}
> 
> 
> AL> __________________________________
> AL> Do you Yahoo!?
> AL> Yahoo! Search - Find what you抮e looking
for
> faster
> AL> http://search.yahoo.com
> 
> === === === === === === === === === === 
> 
> -- 
> Best regards,
>  Zoom.Quiet                            
> 
>  /=======================================\
> ]Time is unimportant, only life important![
>  \=======================================/
> 
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号