~jbaker/storm/nose_plugin

« back to all changes in this revision

Viewing changes to storm/variables.py

  • Committer: Gustavo Niemeyer
  • Date: 2008-06-26 11:57:22 UTC
  • mfrom: (235.2.24 need-for-speed-revenge)
  • Revision ID: gustavo@niemeyer.net-20080626115722-ekl4af6sx2pn08d0
Merging need-for-speed-revenge branch [a=niemeyer,jamesh,radix]
[r=jamesh,therve]

This branch introduces a number of fixes, optimizations, and extensions
on the cextensions module, with speedup purposes.  The module is now
built by default, but still disabled unless the STORM_CEXTENSIONS=1
environment variable is defined.

Besides these, Chris also provided a mechanism to cache ClassAliases,
to prevent the cost of rebuilding the ClassInfo for each alias.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import re
25
25
 
26
26
from storm.exceptions import NoneError
27
 
from storm import Undef
 
27
from storm import Undef, has_cextensions
28
28
 
29
29
 
30
30
__all__ = [
322
322
        return value
323
323
 
324
324
 
325
 
try:
 
325
if has_cextensions:
326
326
    from storm.cextensions import Variable
327
 
except ImportError, e:
328
 
    if "cextensions" not in str(e):
329
 
        raise
330
327
 
331
328
 
332
329
class BoolVariable(Variable):