Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Following along but I got a different result.

So I'm following along in a workspace as Kenneth is teaching about decorators and I get a completely different response than he gets. I cannot figure out why. in dec.py I have:

def logme(func):
      import logging
      logging.basicConfig(level=logging.DEBUG)

      def inner():
             logging.debug("Called {}".format(func,__name__))
             return func()
      return inner()

in the python console:

from dec import logme
@logme
def print_4():
      print(4)

as soon as I hit enter I get this message: DEBUG:root:Called <function print_4 at 0x7fbecebdce18>

then when I type print_4() at the next prompt I get: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object is not callable

Any help understanding where I made a mistake would be appreciated.