Coolest Python recipe of all time

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat May 7 04:29:28 EDT 2011


On Fri, 06 May 2011 12:36:09 -0600, Ian Kelly wrote:

> On Fri, May 6, 2011 at 10:59 AM, Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> wrote:
>> As written, amb is just a brute-force solver using more magic than is
>> good for any code, but it's fun to play with.
> 
> This isn't really amb; as you said it's just a brute-force solver with
> some weird syntax.  The whole point of amb is to enable
> non-deterministic programming, such as this:
[...]
> The amb engine would conceptually execute this function for every
> possible combination of a, b, and c, 

Which pretty much is the definition of "brute-force solver", no?



-- 
Steven



More information about the Python-list mailing list