Created
July 17, 2010 14:36
-
-
Save tswicegood/479549 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QuickOutputter(object): | |
def __lt__(self, msg): | |
print msg | |
return self | |
o = QuickOutputter() | |
o < "Some random message" | |
o < "Some other message" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@superbobry: yup - not trying to mimic the
print >>sys.std*
syntax. The idea would be that you calllog.set_default_output
for a printer, then doo.stderr < "something"
orlog.warn < "omg!"
.Agreed - concise doesn't always make more readable - just trying to see what the thoughts where out there on this style.