|
![]() |
#1 |
Moderator
|
Кстати, если к containerEnumerator добавить один метод:
X++: public container enumerate() { return [idx, conpeek(con, idx)]; } X++: items = ['a','b'] for i,thing in enumerate(items): print 'index',i,'contains',thing X++: int idx; ; while(enumerator.moveNext()) { idx++; value = enumerator.current(); } X++: int idx; ; while(enumerator.moveNext()) { [idx, value] = enumerator.enumerate(); } ![]() |
|
![]() |
#2 |
Участник
|
"You put lipstick on a pig, it's still a pig"
|
|