Re: invertability and idempotence
Andrew McNamara <[email protected]> Thu, 22 Oct 2009 20:42:43 +1100
| Newsgroups | gmane.comp.python.mime.devel |
|---|---|
| Message-ID | <[email protected]> |
> > didn't want to introduce new terminology. But referring to this: > > > > > generate(parse(msg)) == msg > > > > as "idempotency" is perfectly valid in my opinion (as in, applying an > > operation multiple times produces the same result). > >That would be generate(generate(msg)) == generate(msg) or >parse(parse(email)) == parse(email). The input and output of >these functions are of *different types*, they cannot possibly be >idempotent. You're splitting hairs - the operation "generate(parse(X))" is idempotent, and that's what I was referring to. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/