On Mon, Apr 27, 2009 at 2:14 AM, Dan Sommers wrote:
> On Sun, 26 Apr 2009 12:30:40 +0300, Ciprian Dorin, Craciun wrote:
>
>> On Sun, Apr 26, 2009 at 12:08 PM, "Martin v. Löwis"
>> wrote:
>
>>> No, the problem is that you are using way too many functions,
On Sun, Apr 26, 2009 at 12:08 PM, "Martin v. Löwis" wrote:
>> From your comments I understand that the only problem with my code
>> proposal are the function names...
>
> No, the problem is that you are using way too many functions, that do
> too little. The problem with that is then that you
On Sun, Apr 26, 2009 at 8:11 AM, Steven D'Aprano
wrote:
> On Sat, 25 Apr 2009 10:30:56 +0200, Martin v. Löwis wrote:
>
> Ok... Then what's pythonic? Please give a pythonic
> implementation...
Use the builtin a==b, similar to (equal a b)
>>>
>>> But how about extensibility?
On Sun, Apr 26, 2009 at 7:54 AM, Steven D'Aprano
wrote:
> On Sat, 25 Apr 2009 10:50:50 +0300, Ciprian Dorin, Craciun wrote:
>
>> On Sat, Apr 25, 2009 at 10:43 AM, wrote:
>>> Ciprian Dorin, Craciun:
>>>> Python way:
>>>> -
>>>>
On Sat, Apr 25, 2009 at 11:36 PM, Brett Hoerner wrote:
> On Apr 25, 8:11 am, "Ciprian Dorin, Craciun"
> wrote:
>> Well in fact I would have written it like:
>>
>> def validate_commandline(rexes, line) :
>> if not compare (rexes, line, re.match)
On Sat, Apr 25, 2009 at 4:01 PM, "Martin v. Löwis" wrote:
>> Indeed the example I've given is purely theoretical. But still, I
>> could find a use case for such a thing: just imagine we are building a
>> small shell-like application that reads one line (the commands),
>> splits it by spaces an
On Sat, Apr 25, 2009 at 1:55 PM, "Martin v. Löwis" wrote:
>> A practical example: I have lists that contain strings, but I want
>> to compare them in an case-insensitive way...
>
> I'd claim that this is still theoretical: what are these strings, and
> why do you have lists of them that you wa
On Sat, Apr 25, 2009 at 11:36 AM, "Martin v. Löwis" wrote:
>> I don't get that impression from Lisp programmers.
>
> I observe a phenomenon on language fanatics, no matter what language,
> but in particular for the less-than-mainstream language: the desire
> to formulate trivial algorithms over an
On Sat, Apr 25, 2009 at 11:30 AM, "Martin v. Löwis" wrote:
Ok... Then what's pythonic? Please give a pythonic implementation...
>>> Use the builtin a==b, similar to (equal a b)
>>
>> But how about extensibility?
> [...]
>
> I see that you allow for a different comparison function. I d
On Sat, Apr 25, 2009 at 11:04 AM, Paul Rubin
<http://phr...@nospam.invalid> wrote:
> "Ciprian Dorin, Craciun" writes:
>> Ok... Then what's pythonic? Please give a pythonic implementation...
>
> Use the builtin a==b, similar to (equal a b)
On Sat, Apr 25, 2009 at 10:43 AM, wrote:
> Ciprian Dorin, Craciun:
>> Python way:
>> -
>> def eq (a, b) :
>> return a == b
>>
>> def compare (a, b, comp = eq) :
>> if len (a) != len (b) :
>> return False
>> for
On Sat, Apr 25, 2009 at 9:06 AM, Carl Banks wrote:
> In answering the recent question by Mark Tarver, I think I finally hit
> on why Lisp programmers are the way they are (in particular, why they
> are often so hostile to the "There should only be one obvious way to
> do it" Zen).
>
> Say you put
On Tue, Mar 3, 2009 at 7:03 PM, Ivan wrote:
> Hello everyone,
>
> I know this is not a direct python question, forgive me for that, but
> maybe some of you will still be able to help me. I've been told that
> for my application it would be best to learn a scripting language, so
> I looked around a
Have you tried CherryPy? http://www.cherrypy.org/
It's not a template engine, but a simple web server engine, and
you could code your conditionals and loops directly in Python... When
I have tried it, it looked very nice and easy.
Ciprian.
On 10/15/07, allen.fowler <[EMAIL PROTECTED
14 matches
Mail list logo