Source

pygame / lib / sndarray.py

Diff from to

lib/sndarray.py

     import pygame._numpysndarray as numpysnd
     __hasnumpy = True
     __arraytype = "numpy"
-except ImportError, msg:
+except ImportError:
     __hasnumpy = False
 
 try:
     __hasnumeric = False
 
 if not __hasnumpy and not __hasnumeric:
-    raise ImportError, "no module named numpy or Numeric found"
+    raise ImportError("no module named numpy or Numeric found")
 
 def array (sound):
     """pygame.sndarray.array(Sound): return array
         return numericsnd.array (sound)
     elif __arraytype == "numpy":
         return numpysnd.array (sound)
-    raise NotImplementedError, "sound arrays are not supported"
+    raise NotImplementedError("sound arrays are not supported")
 
 def samples (sound):
     """pygame.sndarray.samples(Sound): return array
         return numericsnd.samples (sound)
     elif __arraytype == "numpy":
         return numpysnd.samples (sound)
-    raise NotImplementedError, "sound arrays are not supported"
+    raise NotImplementedError("sound arrays are not supported")
 
 def make_sound (array):
     """pygame.sndarray.make_sound(array): return Sound
         return numericsnd.make_sound (array)
     elif __arraytype == "numpy":
         return numpysnd.make_sound (array)
-    raise NotImplementedError, "sound arrays are not supported"
+    raise NotImplementedError("sound arrays are not supported")
 
 def use_arraytype (arraytype):
     """pygame.sndarray.use_arraytype (arraytype): return None
         if __hasnumeric:
             __arraytype = arraytype
         else:
-            raise ValueError, "Numeric arrays are not available"
+            raise ValueError("Numeric arrays are not available")
         
     elif arraytype == "numpy":
         if __hasnumpy:
             __arraytype = arraytype
         else:
-            raise ValueError, "numpy arrays are not available"
+            raise ValueError("numpy arrays are not available")
     else:
-        raise ValueError, "invalid array type"
+        raise ValueError("invalid array type")
 
 def get_arraytype ():
     """pygame.sndarray.get_arraytype (): return str
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.