Ben Finney wrote:
> def latex(val):
> def make_result_in_the_absence_of_a_latex_method():
> result = transmogrify(val)
> return result
>
> try:
> typeset_func = val.latex
> except AttributeError:
> typeset_func = make_result_in_the_absence_of_a_latex_met
Arnaud Delobelle wrote:
> This means that EAFP made me hide a typo which would have been obviously
> detected had I LBYLed, i.e. instead of
>
> try:
> return val.latex()
> except AttributeError:
> ...
>
> do
>
> if hasattr(val, 'latex'):
> return val.latex()
Paul Miller wrote:
> On Mon, 23 Nov 2009 19:57:05 -0800, Richard Thomas wrote:
>
>> Not sure exactly how you're representing graphs, this seems like the
>> simplest way of listing the edges.
>>
>> def complete_partite(*sizes):
>> total = sum(sizes)
>> nodes, edges = range(total), []
>>
[EMAIL PROTECTED] wrote:
> If you're an Emacs user who has used both python-mode.el (the python mode
> code distributed with Python and XEmacs) and python.el (the python mode code
> distributed with GNU Emacs), I'd like to get your impressions on how they
> compare and where you feel the bugs lie.