2005年02月04日 星期五 10:38
谁知道这个邮件是怎么回事? 我一发邮件就回复这个。 MAILER-DAEMON at eyou.com 写道: > Hi. This is the deliver program at eyou.com. > I'm afraid I wasn't able to deliver your message to the following > addresses. > This is a permanent error; I've given up. Sorry it didn't work out. > > asine.tam at tom.com > 550 CoremailSys:System is busy. epoDABHgAkIDAD5S.1 > --- Attachment is a copy of the message. > > > ------------------------------------------------------------------------ > > 主题: > Re: [python-chinese] 更Pythonic的实现方式 > 发件人: > cpunion <cpunion at 263.net> > 日期: > Fri, 04 Feb 2005 10:36:47 +0800 > 收件人: > python-chinese at lists.python.cn > > 收件人: > python-chinese at lists.python.cn > > >是要简洁得多。 > >不过从我多次测试来看,这样的写法好像速度会慢一些。 > >Qiangning Hong 写道: > > > >>Wang Kebo wrote: >> >> >> >> >>>以下的代码是从limodou的blog上截下来的。不过,总觉得这段代码不是太优雅, >>>谁可以想到更加pythonic的实现方式?我觉得这样的讨论,能使我们更加熟悉 >>>python的特性。 >>> >>> >>> >>> >>[snip] >> >> >> >> >> >>> def getHomeDir(): >>> ''' Try to find user's home directory, otherwise return current >>> directory.''' >>> try: >>> path1=os.path.expanduser("~") >>> except: >>> path1="" >>> try: >>> path2=os.environ["HOME"] >>> except: >>> path2="" >>> >>> >>> >>> >>os.path.expanduser("~") 应该和 os.environ["HOME"]是等价的。 >> >> >> >> >> >>> try: >>> path3=os.environ["USERPROFILE"] >>> except: >>> path3="" >>> >>> if not os.path.exists(path1): >>> if not os.path.exists(path2): >>> if not os.path.exists(path3): >>> return os.getcwd() >>> else: return path3 >>> else: return path2 >>> else: return path1 >>> >>> >>> >>> >>可以简化成: >> >>def getHomeDir(): >> path1 = os.environ.get('HOME', '') >> path2 = os.environ.get('USERPROFILE', '') >> return os.path.exists(path1) and path1 \ >> or os.path.exists(path2) and path2 \ >> or os.getcwd() >>_______________________________________________ >>python-chinese list >>python-chinese at lists.python.cn >>http://python.cn/mailman/listinfo/python-chinese >> >> >> >> >> >> >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese > >
2005年02月04日 星期五 10:46
最近总是出这种东西 ----- Original Message ----- From: "cpunion" <cpunion at 263.net> To: <python-chinese at lists.python.cn> Sent: Friday, February 04, 2005 10:38 AM Subject: [python-chinese] Re: failure notice > 谁知道这个邮件是怎么回事? > > 我一发邮件就回复这个。 > > MAILER-DAEMON at eyou.com 写道: > >> Hi. This is the deliver program at eyou.com. >> I'm afraid I wasn't able to deliver your message to the following >> addresses. >> This is a permanent error; I've given up. Sorry it didn't work out. >> >> asine.tam at tom.com >> 550 CoremailSys:System is busy. epoDABHgAkIDAD5S.1 >> --- Attachment is a copy of the message. >> >> >> ------------------------------------------------------------------------ >> >> 主题: >> Re: [python-chinese] 更Pythonic的实现方式 >> 发件人: >> cpunion <cpunion at 263.net> >> 日期: >> Fri, 04 Feb 2005 10:36:47 +0800 >> 收件人: >> python-chinese at lists.python.cn >> >> 收件人: >> python-chinese at lists.python.cn >> >> >>是要简洁得多。 >> >>不过从我多次测试来看,这样的写法好像速度会慢一些。 >> >>Qiangning Hong 写道: >> >> >> >>>Wang Kebo wrote: >>> >>> >>> >>> >>>>以下的代码是从limodou的blog上截下来的。不过,总觉得这段代码不是太优雅, >>>>谁可以想到更加pythonic的实现方式?我觉得这样的讨论,能使我们更加熟悉 >>>>python的特性。 >>>> >>>> >>>> >>>> >>>[snip] >>> >>> >>> >>> >>> >>>> def getHomeDir(): >>>> ''' Try to find user's home directory, otherwise return current >>>> directory.''' >>>> try: >>>> path1=os.path.expanduser("~") >>>> except: >>>> path1="" >>>> try: >>>> path2=os.environ["HOME"] >>>> except: >>>> path2="" >>>> >>>> >>>> >>>> >>>os.path.expanduser("~") 应该和 os.environ["HOME"]是等价的。 >>> >>> >>> >>> >>> >>>> try: >>>> path3=os.environ["USERPROFILE"] >>>> except: >>>> path3="" >>>> >>>> if not os.path.exists(path1): >>>> if not os.path.exists(path2): >>>> if not os.path.exists(path3): >>>> return os.getcwd() >>>> else: return path3 >>>> else: return path2 >>>> else: return path1 >>>> >>>> >>>> >>>> >>>可以简化成: >>> >>>def getHomeDir(): >>> path1 = os.environ.get('HOME', '') >>> path2 = os.environ.get('USERPROFILE', '') >>> return os.path.exists(path1) and path1 \ >>> or os.path.exists(path2) and path2 \ >>> or os.getcwd() >>>_______________________________________________ >>>python-chinese list >>>python-chinese at lists.python.cn >>>http://python.cn/mailman/listinfo/python-chinese >>> >>> >>> >>> >>> >>> >>_______________________________________________ >>python-chinese list >>python-chinese at lists.python.cn >>http://python.cn/mailman/listinfo/python-chinese >> >> > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese
2005年02月04日 星期五 18:33
我们中的某个人的邮件服务器可能出了问题。 我也常收到。我从来没有给那个写过邮件,都是直接回复到列表里面。
Zeuux © 2025
京ICP备05028076号