Where can I go to get information about the size of, say, unsigned int compiling under gcc for Mac OS X (both 32 and 64 bits)? In general I'd love to have a resource I can go to with a compiler/settings/platform/type and be able to look up how big that type will be. Does anyone know of such a thing?
Update: Thanks for all the responses....
i just posted below query to comp.lang.python, but i feel this kind of question has some kind of right-of-way here on stackoverflow, too, so be it repeated. the essence: why does ‘builtins’ have two distinct interpretations in python 3?—here the details go:
i would be very gladly accept any commentaries about what this
sentence, gleaned...
I'm converting a VB6 COM object that works with classic ASP to a c# .Net COM Object
Interop_COMSVCS.ObjectContext objContext;
Interop_COMSVCS.AppServer objAppServer;
objAppServer = null; // need to initialize before using
objAppServer = new Interop_COMSVCS.AppServer();
objContext = objAppServer.G...
... the is keyword that can be used for equality in strings.
>>> s = 'str'
>>> s is 'str'
True
>>> s is 'st'
False
I tried both __is__() and __eq__() but they didn't work.
>>> class MyString:
... def __init__(self):
... self.s = 'string'
... def __is__(self, s):
... return self.s == s
...
>>>
>>>
>>> m = MyString()
>>> m ...
suppose on init I've install my function under builtins
then throughout my project I can access it directly that function, no need to import, but how can I tell this to eclipse - so it should not show RED Error "undefined variable"
__builtins__['_'] = gettext.gettext
...
How can I retrieve names of all builtins for my current python distribution during runtime?
...
For code:
#!/usr/bin/python
src = """
print '!!!'
import os
"""
obj = compile(src, '', 'exec')
eval(obj, {'__builtins__': False})
I get output:
!!!
Traceback (most recent call last):
File "./test.py", line 9, in <module>
eval(obj, {'__builtins__': False})
File "", line 3, in <module>
ImportError: __import__ not found
Bot...