Skip to content

Ramblings on startups, NYC, advertising and hacking (mostly Python)

  • Home
  • Django
  • Hacking
  • Startups
  • Tech
  • Design
  • Madison Ave
  • All Posts

Author

Chris Kief is currently the Head of Technology at 360i and resides in New York City.

Top Posts

  • Django Generic DetailView without a PK or Slug
  • How to Kill a Process by Port on OS X
  • Django Form Credit Card Field with Pattern, Length and Luhn Validation
  • Subclass a Django Model Form and Add Extra Fields
  • Django Form Wizard and Getting Data from Previous Steps
  • Access Django Constants from settings.py in a Template
  • Django ModelForm and Conditionally Disabled (Readonly) Fields
  • Django Remember Me Option at Sign In
  • Django Template Tag for Truncating Characters at a Word Boundary
  • Combine 2 Django Querysets from Different Models

Tags

  • A16Z
  • AJAX
  • Amazon AWS
  • AWS
  • Basics
  • Celery
  • Chrome
  • Class-based Views
  • Collaboration Apps
  • Compressor
  • Design
  • Django
  • DNS
  • Facebook
  • Forms
  • Fred Wilson
  • Google
  • HipChat
  • IPO
  • MacPorts
  • Marc Andreessen
  • Mavericks
  • Mixins
  • ModelForms
  • Models
  • MySQL
  • Nginx
  • Node
  • NPM
  • NYC
  • Oauth
  • OS X
  • PHP
  • PIP
  • Pitching
  • PyCharm
  • Python
  • QA
  • RabbitMQ
  • RightScale
  • Settings
  • SSL
  • Startup School
  • Symfony2
  • Template Tag
  • Twitter
  • UX
  • VC
  • Views
  • Xcode

Follow me on Twitter

My Tweets

Tag: Introspection

Python Introspection

Python has a strong set of introspection features.

Take a look at the following built-in functions:

type()
dir()
id()
getattr()
hasattr()
globals()
locals()
callable()

type() and dir() are particularly useful for inspecting the type of an object and its set of attributes, respectively.

Share this:

  • Pocket
  • Twitter
  • LinkedIn
  • Facebook
  • More
  • Email
  • Reddit

Like this:

Like Loading...
Posted on May 6, 2014Categories HackingTags Introspection, PythonLeave a comment on Python Introspection
Blog at WordPress.com.
  • Follow Following
    • Ramblings on startups, NYC, advertising and hacking (mostly Python)
    • Join 475 other followers
    • Already have a WordPress.com account? Log in now.
    • Ramblings on startups, NYC, advertising and hacking (mostly Python)
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
%d bloggers like this: