#6340: [with patch, needs review] var('x',ns=False)  -- should go boom but
silently gives a new symbolic variable
----------------------+-----------------------------------------------------
 Reporter:  was       |       Owner:  burcin             
     Type:  defect    |      Status:  new                
 Priority:  major     |   Milestone:  sage-4.1.2         
Component:  calculus  |    Keywords:                     
 Reviewer:            |      Author:  Karl-Dieter Crisman
   Merged:            |  
----------------------+-----------------------------------------------------

Comment(by burcin):

 Sorry for not pointing this out earlier, but I suggest changing the block:

 {{{
     if ('ns', False) in kwds.items():
         raise NotImplementedError, "The new (Pynac) symbolics are now the
 only symbolics; please do not use keyword `ns` any longer."
     if ('ns', True) in kwds.items():
         from sage.misc.misc import deprecation
         deprecation("The new (Pynac) symbolics are now the only symbolics;
 please do not use keyword 'ns' any longer.")
 }}}

 with

 {{{
     if kwds.has_key('ns'):
         if kwds['ns']:
             from sage.misc.misc import deprecation
             deprecation("The new (Pynac) symbolics are now the only
 symbolics; please do not use keyword 'ns' any longer.")
         else:
             raise NotImplementedError, "The new (Pynac) symbolics are now
 the only symbolics; please do not use keyword `ns` any longer."
 }}}

 Even if `kwds` is expected to be empty, it is a waste to call `.items()`.

 Putting a check that `*args` is empty would also help. Dropping arguments
 silently is not very user friendly.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6340#comment:9>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to