/[papo]/papo/forms/hack.py
ViewVC logotype

Diff of /papo/forms/hack.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by jlenton, Fri Dec 6 12:06:36 2002 UTC revision 1.17 by jlenton, Fri Dec 6 19:56:40 2002 UTC
# Line 18  def a2f(a, p=2): Line 18  def a2f(a, p=2):
18    return(round(f, p))    return(round(f, p))
19    
20    
21    # en PAPO, 'true' es 'no false', y 'false' es None, o 0, o string
22    # vacío, o cualquier cosa que empiece con 'n' o 'N'.
23    
24    def is_true(x):
25      r = 0
26      if (x):
27        s = str(x)
28        if (s and s[0] != 'n' and s[0] != 'N'):
29          r = 1
30      return r
31      
32    
33  #   hace que rollback funcione como uno en general quiere (por  #   hace que rollback funcione como uno en general quiere (por
34  #   ejemplo, que haga rollback)  #   ejemplo, que haga rollback)
35    

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26