>
>
> I think that I now understand what my problem is, namely that a function
> created using if:... else: within a def (or inside a lambda function
> definition) can, it seems, only be used for returning numerical values. Any
> attempt to use it symbolically just returns the else: alternative
Thanks to everyone for the replies here and the direct emails from Rob
McMahon and Juan Arias de Reyna. I was trying to isolate my problem and
only succeeded in introducing more confusion. My background is that I have
been using Mathematica for teaching for the past 20+ years and find it
diffic
Robert Bradshaw writes:
> You're assigning x to several values in your list comprehension.
By the way, in Python 3, list comprehensions will have nested scope:
[2] fs@boone ~ $ python2 -c 'x = 2; print(x); print([x**2 for x in
range(5)]); print(x)'
2
[0, 1, 4, 9, 16]
4
[2] f
On Thu, Jul 26, 2012 at 7:50 AM, Anthony Wickstead
wrote:
> Earlier post sent prematurely by acciident, sorry!
>
>
> On Thursday, July 26, 2012 3:47:34 PM UTC+1, Anthony Wickstead wrote:
>>
>> I don't think I am doing anything stupid, but I am fairly new to Sage.
>>
>> I am using Sage 5.0 (Ubuntu
On 07/26/2012 10:50 PM, Anthony Wickstead wrote:
Earlier post sent prematurely by acciident, sorry!
On Thursday, July 26, 2012 3:47:34 PM UTC+1, Anthony Wickstead wrote:
I don't think I am doing anything stupid, but I am fairly new to Sage.
I am using Sage 5.0 (Ubuntu 12.04 64 bit, run
Earlier post sent prematurely by acciident, sorry!
On Thursday, July 26, 2012 3:47:34 PM UTC+1, Anthony Wickstead wrote:
>
> I don't think I am doing anything stupid, but I am fairly new to Sage.
>
> I am using Sage 5.0 (Ubuntu 12.04 64 bit, running under Virtualbox) but
> the same behaviour occ