[Python-Dev] '*' instead of 'yield'? (original) (raw)
Roman Suzi rnd@onego.ru
Sun, 5 Aug 2001 11:54:14 +0400 (MSD)
- Previous message: [Python-Dev] socketmodule fix for IPv6 (mostly additional symbols)
- Next message: [Python-Dev] '*' instead of 'yield'?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello!
Maybe it will be nicier to have unary * instead of 'yield' for generators?
Example I already posted to c.l.p:
from future import generators import calendar, string def calt(year, month): month_cal = calendar.monthcalendar(year, month) * """%s.%s""" % (month, year) * """
%s | """ % (day or " ") * """
print string.join(calt(2001, 8), "")
(This will also enable yields from expressions)
Sincerely yours, Roman Suzi
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd@onego.ru _/ _/ Sunday, August 05, 2001 _/ Powered by Linux RedHat 6.2 _/ _/ "By all means, let's not confuse ourselves with the facts!" _/
- Previous message: [Python-Dev] socketmodule fix for IPv6 (mostly additional symbols)
- Next message: [Python-Dev] '*' instead of 'yield'?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]