[sage-support] Re: is_RealNumber does not work

2007-05-10 Thread Timothy Clemans

I was just trying to make something that would spot issues before an
object is created. You know be robust.

On 5/9/07, Justin C. Walker [EMAIL PROTECTED] wrote:


 On May 9, 2007, at 23:32 , Timothy Clemans wrote:

 
  Well I would like to make a Point class for a 2D coordinate system. So
  what is the best way to prevent most numbers with non-zero imaginary
  parts from becoming x and/or y in the definition of a given point?
  Like I would like to at least prevent 3 + i from being x and/or y.

 Why are you worried about this?  Would it be a problem if someone
 tried to do this with an integer mod 37, or a Plymouth?

 Justin

 --
 Justin C. Walker, Curmudgeon at Large
 Institute for the Absorption of Federal Funds
 ---
 If it weren't for carbon-14, I wouldn't date at all.
 ---



 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: is_RealNumber does not work

2007-05-10 Thread Justin C. Walker


On May 9, 2007, at 23:44 , Timothy Clemans wrote:

 I was just trying to make something that would spot issues before an
 object is created. You know be robust.

I know what you are after, but I am not sure this is the way to do  
it.  You can spend a long time writing code that tries to predict all  
the ways a user can screw things up, and you will always end up with  
code that is full of those kind of holes, and which rapidly becomes  
unmaintainable.  Maybe better to approach robustness a different way  
(e.g., by catching errors when they happen, with 'try' clauses).

I think this thread is way OT now...

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income

When LuteFisk is outlawed,
Only outlaws will have LuteFisk





--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: error when loading

2007-05-10 Thread Martin Albrecht

On Wednesday 09 May 2007 07:35, Brian Harris wrote:
 Quotes didn't change the behavior for that script.  However I get part-
 way through the example.sage script before the error:

I get the same error with a fresh 2.5 install. ipython is at version 0.8.0.

sage: version()
'SAGE Version 2.5, Release Date: 2007-05-08'

sage: attach ctc.py
---
type 'exceptions.AttributeError'Traceback (most recent call last)

/home/malb/Uni/ctc/code/ipython console in module()

/home/malb/sage-2.5/local/lib/python2.5/site-packages/IPython/iplib.py in 
ipmagic(self, arg_s)
955 else:
956 magic_args = self.var_expand(magic_args,1)
-- 957 return fn(magic_args)
958
959 def ipalias(self,arg_s):

/home/malb/sage-2.5/local/lib/python2.5/site-packages/IPython/Magic.py in 
magic_run(self, parameter_s, runner)
   1674 if restore_main:
   1675 sys.modules['__main__'] = restore_main
- 1676 self.shell.reloadhist()
   1677
   1678 return stats

/home/malb/sage-2.5/local/lib/python2.5/site-packages/IPython/iplib.py in 
reloadhist(self)
   1255
   1256 if self.has_readline:
- 1257 self.readline.clear_history()
   1258 self.readline.read_history_file(self.shell.histfile)
   1259

Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: error when loading

2007-05-10 Thread davedo2

I experience the same problem. It happened after the upgrade so I just
did an fresh install
from source and got the same result...Dave

On May 10, 9:33 am, Martin Albrecht [EMAIL PROTECTED]
wrote:
 On Wednesday 09 May 2007 07:35, Brian Harris wrote:

  Quotes didn't change the behavior for that script.  However I get part-
  way through the example.sage script before the error:

 I get the same error with a fresh 2.5 install. ipython is at version 0.8.0.

 sage: version()
 'SAGE Version 2.5, Release Date: 2007-05-08'

 sage: attach ctc.py
 ---
 type 'exceptions.AttributeError'Traceback (most recent call last)

 /home/malb/Uni/ctc/code/ipython console in module()

 /home/malb/sage-2.5/local/lib/python2.5/site-packages/IPython/iplib.py in
 ipmagic(self, arg_s)
 955 else:
 956 magic_args = self.var_expand(magic_args,1)
 -- 957 return fn(magic_args)
 958
 959 def ipalias(self,arg_s):

 /home/malb/sage-2.5/local/lib/python2.5/site-packages/IPython/Magic.py in
 magic_run(self, parameter_s, runner)
1674 if restore_main:
1675 sys.modules['__main__'] = restore_main
 - 1676 self.shell.reloadhist()
1677
1678 return stats

 /home/malb/sage-2.5/local/lib/python2.5/site-packages/IPython/iplib.py in
 reloadhist(self)
1255
1256 if self.has_readline:
 - 1257 self.readline.clear_history()
1258 self.readline.read_history_file(self.shell.histfile)
1259

 Martin

 --
 name: Martin Albrecht
 _pgp:http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
 _www:http://www.informatik.uni-bremen.de/~malb
 _jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---