[Python-Dev] Retrieve an arbitrary element from a set without removing it
"Martin v. Löwis"
martin at v.loewis.de
Mon Oct 26 09:02:10 CET 2009
More information about the Python-Dev mailing list
Mon Oct 26 09:02:10 CET 2009
- Previous message: [Python-Dev] Retrieve an arbitrary element from a set without removing it
- Next message: [Python-Dev] Retrieve an arbitrary element from a set without removing it
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Why not allow that? > > def any(self, predicate=lambda x: True, default=None) > for a in self: > if predicate(a): > break > else: > return default > return a I'm +0 (given that I'm still skeptical about the need to have something like this). Also setting aside the moratorium here, which may disallow that kind of change for a foreseeable feature in any form. Regards, Martin
- Previous message: [Python-Dev] Retrieve an arbitrary element from a set without removing it
- Next message: [Python-Dev] Retrieve an arbitrary element from a set without removing it
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list