<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-1700157236206200597.post6799472260664409462..comments</id><updated>2008-06-24T07:04:08.581-07:00</updated><title type='text'>Comments on Valued Lessons: Monads in Python (with nice syntax!)</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.valuedlessons.com/feeds/6799472260664409462/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html'/><author><name>Peter Thatcher</name><uri>http://www.blogger.com/profile/01092342988993218446</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-2253186197420846762</id><published>2008-06-24T07:04:08.581-07:00</published><updated>2008-06-24T07:04:08.581-07:00</updated><title type='text'>I've done something. It works in the simple exampl...</title><content type='html'>I've done something. It works in the simple examples i've tried but i'm very new to python so it might be only these examples. I encode a do-bloc as a string of the form&lt;BR/&gt;&lt;BR/&gt;"""&lt;BR/&gt;x &lt;- a_expresion&lt;BR/&gt;another_expression&lt;BR/&gt;y &lt;- again_one&lt;BR/&gt;...&lt;BR/&gt;last_expression&lt;BR/&gt;"""&lt;BR/&gt;&lt;BR/&gt;And build the expression with bind from it and then evaluate it.&lt;BR/&gt;&lt;BR/&gt;I had a strange problem: if i use a do-block in a fonctoin which takes an argument, it can only be seen in the first statement of the do block :&lt;BR/&gt;&lt;BR/&gt;def test(x):&lt;BR/&gt;  return eval("mreturn(x)")&lt;BR/&gt;&lt;BR/&gt;will work, but :&lt;BR/&gt;&lt;BR/&gt;def test(x):&lt;BR/&gt;  return eval("mreturn(1).bind(lambda y : mreturn(x)")&lt;BR/&gt;&lt;BR/&gt;will fail saying "NameError: global name 'x' is not defined"&lt;BR/&gt;&lt;BR/&gt;I has to build a closure to the expression from the list of local names.&lt;BR/&gt;Here is my code : &lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;#&lt;BR/&gt;# MONAD LIST&lt;BR/&gt;#&lt;BR/&gt;&lt;BR/&gt;def concat(x) :&lt;BR/&gt;  res = []&lt;BR/&gt;  for y in x :&lt;BR/&gt;    res.extend(y)&lt;BR/&gt;  return res&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;class Monad:&lt;BR/&gt;    value=None&lt;BR/&gt;    def __init__(self,val):&lt;BR/&gt;        self.value=val&lt;BR/&gt;&lt;BR/&gt;    @staticmethod&lt;BR/&gt;    def mreturn(self,val):&lt;BR/&gt;        raise NotImplementedError&lt;BR/&gt;&lt;BR/&gt;    def bind(self, func):&lt;BR/&gt;        raise NotImplementedError&lt;BR/&gt;&lt;BR/&gt;    def __ge__(self, bindee):&lt;BR/&gt;        return self.bind(bindee)&lt;BR/&gt;&lt;BR/&gt;    # THE &gt;&gt; Haskell operator&lt;BR/&gt;    def __rshift__(self, bindee_without_arg):&lt;BR/&gt;        return self.bind(lambda _ : bindee_without_arg)&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;class Liste(Monad):&lt;BR/&gt;    @staticmethod&lt;BR/&gt;    def mreturn(val) :&lt;BR/&gt;        return Liste([val])&lt;BR/&gt;&lt;BR/&gt;    def bind(self,func):&lt;BR/&gt;        def fval(x):&lt;BR/&gt;           return func(x).value&lt;BR/&gt;&lt;BR/&gt;        return Liste(concat(map(fval,self.value)))&lt;BR/&gt;&lt;BR/&gt;    @staticmethod&lt;BR/&gt;    def zero():&lt;BR/&gt;        return Liste([])&lt;BR/&gt;&lt;BR/&gt;    def run(self):&lt;BR/&gt;        return self.value&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;#&lt;BR/&gt;# THE DO NOTATION&lt;BR/&gt;#&lt;BR/&gt;&lt;BR/&gt;import re&lt;BR/&gt;import compiler&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;# PARSE ASSIGNMENT "x &lt;- m"&lt;BR/&gt;doasgn = re.compile(r"^\s*(\w)+\s*&lt;-\s*(.*)")&lt;BR/&gt;# PARSE NON EMPTY LINES&lt;BR/&gt;dostmt = re.compile(r"\S.*\S?")&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;# BUILD THE BIND EXPRESSION FROM OF LIST OF DO-STATEMENTs&lt;BR/&gt;def dolist(l):&lt;BR/&gt;  if len(l) == 1 :&lt;BR/&gt;    return l[0]&lt;BR/&gt;  else :&lt;BR/&gt;    mre = doasgn.match(l[0])&lt;BR/&gt;    if mre :&lt;BR/&gt;       g = mre.groups()&lt;BR/&gt;       return ("(" + g[1] + ").bind(lambda " + g[0] + " : " + dolist(l[1:]) + ")")&lt;BR/&gt;    else :&lt;BR/&gt;       return ("(" + l[0] + ") &gt;&gt; (" + dolist(l[1:]) + ")")&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;# TRANSORM A DO BLOCK INTO A BIND EXPRESSION&lt;BR/&gt;do    = lambda s : dolist(dostmt.findall(s))&lt;BR/&gt;# COMPILE A DO BLOCK INTO A CODE EXPRESSION&lt;BR/&gt;cdo   = lambda s : compiler.compile(do(s),'compiledo.py','eval')&lt;BR/&gt;&lt;BR/&gt;# PYTHON HAS PROBLEMS TO SEE LOCAL VARIABLES  WHEN EVALUATING :&lt;BR/&gt;#&lt;BR/&gt;# def test(x) :&lt;BR/&gt;#   return eval(do("""&lt;BR/&gt;#       List.mreturn(x)&lt;BR/&gt;#       """)&lt;BR/&gt;#&lt;BR/&gt;# print test(5).run()&lt;BR/&gt;#&lt;BR/&gt;# Will give the good result but :&lt;BR/&gt;#&lt;BR/&gt;# def test(x) :&lt;BR/&gt;#   return eval(do("""&lt;BR/&gt;#       y &lt;- .....&lt;BR/&gt;#       List.mreturn(x)&lt;BR/&gt;#       """)&lt;BR/&gt;#&lt;BR/&gt;# print test(5).run()&lt;BR/&gt;#&lt;BR/&gt;# Will give the error : NameError: global name 'x' is not defined&lt;BR/&gt;# To avoid that, we build a closure from the list of local variables&lt;BR/&gt;# with (lambda x : ...)(locals()["x"])&lt;BR/&gt;# So x is in the context of the expression with the good value in locals&lt;BR/&gt;&lt;BR/&gt;def closure(v,m):&lt;BR/&gt;  l = v&lt;BR/&gt;  for x in m.keys() :&lt;BR/&gt;   l = "((lambda " + x + " : " + l + ")(m[\"" + x + "\"]))"&lt;BR/&gt;  return "(lambda m : " + l + ")"&lt;BR/&gt;&lt;BR/&gt;# JUST TO EVALUATE THE BLOCK&lt;BR/&gt;def rundo(g,l,s):&lt;BR/&gt;  return eval(closure(do(s),l),g,l)(l)&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;# A TEST :&lt;BR/&gt;# Liste([a,.....]) will lift the list [a,....] into the monad&lt;BR/&gt;def toto(x,y,z,d):&lt;BR/&gt;  l = test.rundo(globals(),locals(),"""&lt;BR/&gt;    a &lt;- Liste([x , x + 1 ])&lt;BR/&gt;    b &lt;- Liste([y , y + 1 ])&lt;BR/&gt;    c &lt;- Liste([z , z + 1 ])&lt;BR/&gt;    Liste.mreturn(x + y + z + a + b + c + d)&lt;BR/&gt;    """)&lt;BR/&gt;  return l.run()&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;print toto(1,10,100,1000)&lt;BR/&gt;# WILL GIVE : [1222, 1223, 1223, 1224, 1223, 1224, 1224, 1225]</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/2253186197420846762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/2253186197420846762'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1214316248581#c2253186197420846762' title=''/><author><name>GTof</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-5006814456841238204</id><published>2008-06-23T14:57:03.059-07:00</published><updated>2008-06-23T14:57:03.059-07:00</updated><title type='text'>I played a bit with your code and unfortunately yi...</title><content type='html'>I played a bit with your code and unfortunately yields are not good for all cases, for example it doesn't work with the List Monad.&lt;BR/&gt;&lt;BR/&gt;When you bind the monad 'm' with the function 'f'. 'f' can be called several times, this tipically the case with the List Monad.&lt;BR/&gt;&lt;BR/&gt;But with yields, the code:&lt;BR/&gt;x = yield a&lt;BR/&gt;y = yield b&lt;BR/&gt;c&lt;BR/&gt;Which should be equivalant to :&lt;BR/&gt;a &gt;&gt;= (lambda x : b &gt;&gt;= (lambda y : c))&lt;BR/&gt;&lt;BR/&gt;So let's call 'f' = (lambda x : b &gt;&gt;= (lambda y : c)) . With the List monad, 'f' has to be called as many times as elements in a, which means 'x' has to take as many values as elements in 'a'. But the second time we use "send" to give a value to 'x' through the yield, it won't be another value to 'x' but the value to 'y'.&lt;BR/&gt;&lt;BR/&gt;So your code works well for monads where the binding fonction is called once and exactly once, otherwise you won't call the right yield.&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;A solution would be to fork the generator as many time as values to give to 'x' but i couldn't get the library to work.&lt;BR/&gt;&lt;BR/&gt;Aanand uses a very nice approach in Ruby, it transform the abstract syntax tree at run time to replace the do-notations assginments by plain calls to bind. I tried to port it to python but ast is python looks to complex !! And i don't even now if it's possible to access the AST of an object what is needed to deal with alpha-conversion and avoid name capture.&lt;BR/&gt;&lt;BR/&gt; What would be great would be a python preprocessor, but i didn't find any.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/5006814456841238204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/5006814456841238204'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1214258223059#c5006814456841238204' title=''/><author><name>GTof</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-8567372348184954711</id><published>2008-06-17T15:01:46.458-07:00</published><updated>2008-06-17T15:01:46.458-07:00</updated><title type='text'>Thank your for this great stuff!I'm writing a mona...</title><content type='html'>Thank your for this great stuff!&lt;BR/&gt;&lt;BR/&gt;I'm writing a monad tutorial with examples in various languages. I would like to use your code to have the do-notation in the examples in python. Would you allow it ? And if yes, under which licence ?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/8567372348184954711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/8567372348184954711'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1213740106458#c8567372348184954711' title=''/><author><name>GTof</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-2012214161747287799</id><published>2008-05-04T05:20:39.432-07:00</published><updated>2008-05-04T05:20:39.432-07:00</updated><title type='text'>hi, i just found this after implementing monads in...</title><content type='html'>hi, i just found this after implementing monads in python myself.  i'd be interested in hearing what you think of my code.  i took a completely different approach and i am not even sure i am "really" implementing monads - i don't try to use lambdas to bind the values, for example.  on the other hand, it's a *lot* simpler :o)&lt;BR/&gt;&lt;BR/&gt;i don't completely understand what you've done, but when i have a spare moment i am going to go step-by-step through the details (i am returning to python after not using much for several years and generators are pretty much new to me).&lt;BR/&gt;&lt;BR/&gt;cheers,&lt;BR/&gt;andrew&lt;BR/&gt;&lt;BR/&gt;ps http://acooke.org/cute/MonadsinPy0.html</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/2012214161747287799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/2012214161747287799'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1209903639432#c2012214161747287799' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-8798490618346617812</id><published>2008-03-19T06:32:33.309-07:00</published><updated>2008-03-19T06:32:33.309-07:00</updated><title type='text'>brian: Abstract Base Classes.  Google.  Go now, yo...</title><content type='html'>brian: Abstract Base Classes.  Google.  Go now, you can make it.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/8798490618346617812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/8798490618346617812'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1205933553309#c8798490618346617812' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-7869834350741766021</id><published>2008-02-15T18:37:02.673-08:00</published><updated>2008-02-15T18:37:02.673-08:00</updated><title type='text'>You can not raise a NotImplementedError in code th...</title><content type='html'>You can not raise a NotImplementedError in code that is meant to demonstrate a proof-of-principle to be read on a blogpost.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/7869834350741766021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/7869834350741766021'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1203129422673#c7869834350741766021' title=''/><author><name>Brian</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-5536184610333024166</id><published>2008-01-16T11:45:21.555-08:00</published><updated>2008-01-16T11:45:21.555-08:00</updated><title type='text'>Hi peter,Neat!  I'm still going through the monad ...</title><content type='html'>Hi peter,&lt;BR/&gt;&lt;BR/&gt;Neat!  I'm still going through the monad code, but I was interested in the use of Maybe and Failure.  How easy is it to add these to unsafe code?  And what sort of debugging output is attached to them?  I guess I'm basically curious as to how functional programming does debugging.&lt;BR/&gt;&lt;BR/&gt;BTW, it inspired me to use a Python exception handling framework to get most of the benefits of the Maybe monad.  The post is &lt;A HREF="http://ndanger.org/blog/2008/01/16/error-handling-in-python-monads-are-too-much-for-me/" REL="nofollow"&gt;here&lt;/A&gt;.&lt;BR/&gt;&lt;BR/&gt;Looking forward to the should to know more.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/5536184610333024166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/5536184610333024166'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1200512721555#c5536184610333024166' title=''/><author><name>Dave</name><uri>http://ndanger.org/blog/</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-3205815827801769775</id><published>2008-01-08T11:43:38.291-08:00</published><updated>2008-01-08T11:43:38.291-08:00</updated><title type='text'>Thanks.  I fixed it.</title><content type='html'>Thanks.  I fixed it.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/3205815827801769775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/3205815827801769775'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1199821418291#c3205815827801769775' title=''/><author><name>Peter Thatcher</name><uri>http://www.blogger.com/profile/01092342988993218446</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14656196412694126258'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-1666897293268707345</id><published>2008-01-08T10:55:50.720-08:00</published><updated>2008-01-08T10:55:50.720-08:00</updated><title type='text'>In Monad.make_decorator, you're using the comparis...</title><content type='html'>In Monad.make_decorator, you're using the comparison (==) operator when I think you mean to use the assignment operator (=). "decorated.__name__ == undecorated.__name__" and "decorator.__name__ == func.__name__" should both be assignment.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/1666897293268707345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/1666897293268707345'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1199818550720#c1666897293268707345' title=''/><author><name>theokayplus</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-7105007358116833613</id><published>2008-01-08T09:00:44.131-08:00</published><updated>2008-01-08T09:00:44.131-08:00</updated><title type='text'>I've added fully runnable source to the bottom of ...</title><content type='html'>I've added fully runnable source to the bottom of the article.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/7105007358116833613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/7105007358116833613'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1199811644131#c7105007358116833613' title=''/><author><name>Peter Thatcher</name><uri>http://www.blogger.com/profile/01092342988993218446</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14656196412694126258'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-2684148385796457981</id><published>2008-01-08T05:48:42.148-08:00</published><updated>2008-01-08T05:48:42.148-08:00</updated><title type='text'>Can't you show full runnable source file? It will ...</title><content type='html'>Can't you show full runnable source file? It will be a great help to know about the subject.&lt;BR/&gt;Thanks in advance.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/2684148385796457981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/2684148385796457981'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1199800122148#c2684148385796457981' title=''/><author><name>_winnie</name><uri>http://www.blogger.com/profile/04382725998308329157</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-5269919909086235441</id><published>2008-01-08T04:09:49.515-08:00</published><updated>2008-01-08T04:09:49.515-08:00</updated><title type='text'>I'm dying to know the should... all this functiona...</title><content type='html'>I'm dying to know the should... all this functional stuff is quite confusing... I get the idea that I need to learn it, just need to make the jump (and it seems like a big one).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/5269919909086235441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/5269919909086235441'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1199794189515#c5269919909086235441' title=''/><author><name>Stu</name><uri>http://www.blogger.com/profile/08755227063937859112</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-1700157236206200597.post-191795277195126632</id><published>2008-01-07T20:35:00.922-08:00</published><updated>2008-01-07T20:35:00.922-08:00</updated><title type='text'>Holy moly! This is a really nice way of doing it.I...</title><content type='html'>Holy moly! &lt;BR/&gt;&lt;BR/&gt;This is a really nice way of doing it.&lt;BR/&gt;&lt;BR/&gt;I've been interested in using Monads in my Python code for some time (for parsing) and I think that I'm definitely going to use your approach.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/191795277195126632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1700157236206200597/6799472260664409462/comments/default/191795277195126632'/><link rel='alternate' type='text/html' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html?showComment=1199766900922#c191795277195126632' title=''/><author><name>Winterstream</name><uri>http://www.blogger.com/profile/04982097826539673880</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.valuedlessons.com/2008/01/monads-in-python-with-nice-syntax.html' ref='tag:blogger.com,1999:blog-1700157236206200597.post-6799472260664409462' source='http://www.blogger.com/feeds/1700157236206200597/posts/default/6799472260664409462' type='text/html'/></entry></feed>