2006年05月25日 星期四 16:02
>>> str = time.localtime( 1148007668 ) >>> str (2006, 5, 19, 11, 1, 8, 4, 139, 0) >>> for k in str: ... k = str( k ) ... print k ... Traceback (most recent call last): File "", line 2, in ? TypeError: 'time.struct_time' object is not callable -- 因为你,我才在这沙漠中独步而行… http://spaces.msn.com/shoujing/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060525/1cf1f9e8/attachment.htm
2006年05月25日 星期四 16:04
对不起,自己弄明白了!耽误大家时间 在06-5-25,肯定来过 <rocker.yuan at gmail.com> 写道: > > >>> str = time.localtime( 1148007668 ) > >>> str > (2006, 5, 19, 11, 1, 8, 4, 139, 0) > >>> for k in str: > ... k = str( k ) > ... print k > ... > Traceback (most recent call last): > File "", line 2, in ? > TypeError: 'time.struct_time' object is not callable > > -- > 因为你,我才在这沙漠中独步而行… > http://spaces.msn.com/shoujing/ > -- 因为你,我才在这沙漠中独步而行… http://spaces.msn.com/shoujing/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060525/c825feca/attachment.html
2006年05月25日 星期四 16:06
k = str( k ) 这一行错了吧? 在06-5-25,肯定来过 <rocker.yuan at gmail.com> 写道: > > 对不起,自己弄明白了!耽误大家时间 > > 在06-5-25,肯定来过 <rocker.yuan at gmail.com> 写道: > > > >>> str = time.localtime( 1148007668 ) > > >>> str > > (2006, 5, 19, 11, 1, 8, 4, 139, 0) > > >>> for k in str: > > ... k = str( k ) > > ... print k > > ... > > Traceback (most recent call last): > > File "", line 2, in ? > > TypeError: 'time.struct_time' object is not callable > > > > -- > > 因为你,我才在这沙漠中独步而行… > > http://spaces.msn.com/shoujing/ > > > > > > -- > 因为你,我才在这沙漠中独步而行… > http://spaces.msn.com/shoujing/ > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -- 阿弥陀佛 晕哉 晕哉 -------- 欢迎光临我的菜园子: http://spaces.msn.com/members/headfaint -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060525/fb5a4440/attachment.htm
2006年05月25日 星期四 16:07
我刚才发的那个问题,你能看到吗?我怕发送没成功. 在06-5-25,头太晕 <super852 at gmail.com> 写道: > > k = str( k ) > 这一行错了吧? > > 在06-5-25,肯定来过 <rocker.yuan at gmail.com> 写道: > > > 对不起,自己弄明白了!耽误大家时间 > > 在06-5-25,肯定来过 < rocker.yuan at gmail.com> 写道: > > > >>> str = time.localtime( 1148007668 ) > > >>> str > > (2006, 5, 19, 11, 1, 8, 4, 139, 0) > > >>> for k in str: > > ... k = str( k ) > > ... print k > > ... > > Traceback (most recent call last): > > File "", line 2, in ? > > TypeError: 'time.struct_time' object is not callable > > > > -- > > 因为你,我才在这沙漠中独步而行… > > http://spaces.msn.com/shoujing/ > > > > > > -- > 因为你,我才在这沙漠中独步而行… > http://spaces.msn.com/shoujing/ > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > -- > 阿弥陀佛 晕哉 晕哉 > -------- > 欢迎光临我的菜园子: > http://spaces.msn.com/members/headfaint > -- 阿弥陀佛 晕哉 晕哉 -------- 欢迎光临我的菜园子: http://spaces.msn.com/members/headfaint -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060525/097652de/attachment.html
2006年05月25日 星期四 16:15
能看到的,不过我不懂django。 k = str( k )这一行错在哪儿呢?我刚才以为自己明白了,回头测试一下,问题依然存在其实。麻烦您给解释一下吧 在06-5-25,头太晕 <super852 at gmail.com> 写道: > > 我刚才发的那个问题,你能看到吗?我怕发送没成功. > > 在06-5-25,头太晕 <super852 at gmail.com> 写道: > > > k = str( k ) > > 这一行错了吧? > > > > 在06-5-25,肯定来过 < rocker.yuan at gmail.com> 写道: > > > > > 对不起,自己弄明白了!耽误大家时间 > > > > 在06-5-25,肯定来过 < rocker.yuan at gmail.com> 写道: > > > > > >>> str = time.localtime( 1148007668 ) > > > >>> str > > > (2006, 5, 19, 11, 1, 8, 4, 139, 0) > > > >>> for k in str: > > > ... k = str( k ) > > > ... print k > > > ... > > > Traceback (most recent call last): > > > File "", line 2, in ? > > > TypeError: 'time.struct_time' object is not callable > > > > > > -- > > > 因为你,我才在这沙漠中独步而行… > > > http://spaces.msn.com/shoujing/ > > > > > > > > > > > -- > > 因为你,我才在这沙漠中独步而行… > > http://spaces.msn.com/shoujing/ > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request at lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > -- > > 阿弥陀佛 晕哉 晕哉 > > -------- > > 欢迎光临我的菜园子: > > http://spaces.msn.com/members/headfaint > > > > > > -- > 阿弥陀佛 晕哉 晕哉 > -------- > 欢迎光临我的菜园子: > http://spaces.msn.com/members/headfaint > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -- 因为你,我才在这沙漠中独步而行… http://spaces.msn.com/shoujing/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060525/3f57c1e1/attachment.htm
2006年05月25日 星期四 16:20
>>> import time >>> s=time.localtime(1148007668) >>> s (2006, 5, 19, 11, 1, 8, 4, 139, 0) >>> for k in s: print k 2006 5 19 11 1 8 4 139 0 >>> (2006, 5, 19, 11, 1, 8, 4, 139, 0) 是一个序列 在06-5-25,肯定来过 <rocker.yuan at gmail.com> 写道: > > 能看到的,不过我不懂django。 > > k = str( k )这一行错在哪儿呢?我刚才以为自己明白了,回头测试一下,问题依然存在其实。麻烦您给解释一下吧 > > > 在06-5-25,头太晕 <super852 at gmail.com> 写道: > > > > 我刚才发的那个问题,你能看到吗?我怕发送没成功. > > > > 在06-5-25,头太晕 < super852 at gmail.com> 写道: > > > > > k = str( k ) > > > 这一行错了吧? > > > > > > 在06-5-25,肯定来过 < rocker.yuan at gmail.com> 写道: > > > > > > > 对不起,自己弄明白了!耽误大家时间 > > > > > > 在06-5-25,肯定来过 < rocker.yuan at gmail.com> 写道: > > > > > > > >>> str = time.localtime( 1148007668 ) > > > > >>> str > > > > (2006, 5, 19, 11, 1, 8, 4, 139, 0) > > > > >>> for k in str: > > > > ... k = str( k ) > > > > ... print k > > > > ... > > > > Traceback (most recent call last): > > > > File "", line 2, in ? > > > > TypeError: 'time.struct_time' object is not callable > > > > > > > > -- > > > > 因为你,我才在这沙漠中独步而行… > > > > http://spaces.msn.com/shoujing/ > > > > > > > > > > > > > > > > -- > > > 因为你,我才在这沙漠中独步而行… > > > http://spaces.msn.com/shoujing/ > > > > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese at lists.python.cn > > > Subscribe: send subscribe to python-chinese-request at lists.python.cn > > > Unsubscribe: send unsubscribe to > > > python-chinese-request at lists.python.cn > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > > > > -- > > > 阿弥陀佛 晕哉 晕哉 > > > -------- > > > 欢迎光临我的菜园子: > > > http://spaces.msn.com/members/headfaint > > > > > > > > > > > -- > > 阿弥陀佛 晕哉 晕哉 > > -------- > > 欢迎光临我的菜园子: > > http://spaces.msn.com/members/headfaint > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request at lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > -- > 因为你,我才在这沙漠中独步而行… > http://spaces.msn.com/shoujing/ > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -- 阿弥陀佛 晕哉 晕哉 -------- 欢迎光临我的菜园子: http://spaces.msn.com/members/headfaint -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060525/abed5ace/attachment.html
2006年05月25日 星期四 16:30
str是个元组,不是字典。 要引用里面的元素的话,应该使用下标的形式。 str(k)相当于把str当成函数来调用了,当然会提示not callable。 在 06-5-25,肯定来过<rocker.yuan at gmail.com> 写道: > 能看到的,不过我不懂django。 > > k = str( k )这一行错在哪儿呢?我刚才以为自己明白了,回头测试一下,问题依然存在其实。麻烦您给解释一下吧 > > > 在06-5-25,头太晕 <super852 at gmail.com> 写道: > > > > 我刚才发的那个问题,你能看到吗?我怕发送没成功. > > > > > > 在06-5-25,头太晕 < super852 at gmail.com> 写道: > > > > > > > > k = str( k ) > > > 这一行错了吧? > > > > > > > > > > > > 在06-5-25,肯定来过 < rocker.yuan at gmail.com> 写道: > > > > > > > > > > > > > > > > 对不起,自己弄明白了!耽误大家时间 > > > > > > > > > 在06-5-25,肯定来过 < rocker.yuan at gmail.com> 写道: > > > > > > > > > > > >>> str = time.localtime( 1148007668 ) > > > > >>> str > > > > (2006, 5, 19, 11, 1, 8, 4, 139, 0) > > > > >>> for k in str: > > > > ... k = str( k ) > > > > ... print k > > > > ... > > > > Traceback (most recent call last): > > > > File "", line 2, in ? > > > > TypeError: 'time.struct_time' object is not callable > > > > > > > > > > > > -- > > > > 因为你,我才在这沙漠中独步而行… > > > > http://spaces.msn.com/shoujing/ > > > > > > > > > > > > > > > > > > > > > > -- > > > 因为你,我才在这沙漠中独步而行… > > > http://spaces.msn.com/shoujing/ > > > > > > > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese at lists.python.cn > > > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > > > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > > > > -- > > > 阿弥陀佛 晕哉 晕哉 > > > -------- > > > 欢迎光临我的菜园子: > > > http://spaces.msn.com/members/headfaint > > > > > > > > > > > > -- > > 阿弥陀佛 晕哉 晕哉 > > -------- > > 欢迎光临我的菜园子: > > http://spaces.msn.com/members/headfaint > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > -- > 因为你,我才在这沙漠中独步而行… > http://spaces.msn.com/shoujing/ > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > >
2006年05月25日 星期四 18:55
>>> str(1000) '1000' >>> str = 100 >>> str (100) Traceback (most recent call last): File "", line 1, in ? TypeError: 'int' object is not callable >>> 变量名 不要用 built-in 函数名 > > k = str( k )这一行错在哪儿呢?我刚才以为自己明白了,回头测试一下,问题依然存在其实。麻烦您给解释一下吧 > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060525/5cef8e38/attachment.html
2006年05月25日 星期四 23:12
把变量str换个名字,它覆盖了内部函数str mystr = time.localtime( 1148007668 ) 在 06-5-25,肯定来过<rocker.yuan at gmail.com> 写道: > >>> str = time.localtime( 1148007668 ) > >>> str > (2006, 5, 19, 11, 1, 8, 4, 139, 0) > >>> for k in str: > ... k = str( k ) > ... print k > ... > Traceback (most recent call last): > File "", line 2, in ? > TypeError: 'time.struct_time' object is not callable > > -- > 因为你,我才在这沙漠中独步而行… > http://spaces.msn.com/shoujing/ > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > >
Zeuux © 2025
京ICP备05028076号