473,396 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

missing types in module types?

Hi.

I have found that some types are missing from module types:
import types
from types import *

def check_type(obj):
type_list = [eval(t) for t in dir(types) if t.endswith('Type')]
return [[x, type(obj)] for x in type_list if isinstance(obj, x)]
def fun(): pass

cm = classmethod(fun)
sm = staticmethod(fun)

p = property()
print check_type(cm)
[[<type 'object'>, <type 'classmethod'>]]

print check_type(sm)
[[<type 'object'>, <type 'staticmethod'>]]

print check_type(fun.__init__)
[[<type 'object'>, <type 'method-wrapper'>]]

print check_type(p)
[[<type 'object'>, <type 'property'>]]

Regards Manlio Perillo
Jul 18 '05 #1
0 1081

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dan Bishop | last post by:
I installed Python on the HP 3000 at work today. The interpreter itself appears to be working fine, but "import math", "import datetime", etc. fail with "ImportError: No module named ". ...
12
by: John Burton | last post by:
One of the reasons I like python so much is that the standard installation comes with a whole lot of libraries to do lots of useful things but there seem to be a few things missing from the...
1
by: prabu | last post by:
Hello all, I am new to Python,And this is my first post.I have installed "Fsh",an Opensource Product ,very similar to SSH on my HP-UX B.11.22 U ia64(IPF).It has Python dependency.The problem is...
1
by: Guilherme Pinto | last post by:
Hello. I am reading the book written by Bjarne Stroustrup called " The C++ Programming Language - Special Edition" and had a doubt which a think is really important to distinguish between the...
9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
0
by: JohnR | last post by:
Hi all.. my application uses a custom dll which should be in the same directory as the exe file. If the dll file is missing the application immediately aborts with a "Application has generated an...
0
by: Colin J. Williams | last post by:
Travis Oliphant wrote: > Gerard Vermeulen wrote: > >> On Wed, 01 Feb 2006 11:15:09 -0500 >> "Colin J. Williams" <cjw@sympatico.ca> wrote: >> >> >> >>
2
by: Ronen Tidhar | last post by:
I would like your help to find out how do I retrieve by reflection all the types in web application? In VS 2003 I used to do: public class Global : System.Web.HttpApplication { protected...
17
by: Christoph Zwerschke | last post by:
I'm just reading PEP 3107 (function annotations) and wonder why exceptions are not mentioned there. I think it would be helpful if one could specify which exceptions can be raised by a function,...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.