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 Object-Oriented Python Advanced Objects Controlling Conversion

Workspsces doesn't work

How did he get in the console in the rpg ?? please help!

nakalkucing
nakalkucing
12,964 Points

R u still having trouble with workspaces?

2 Answers

You can review the video Multiple Superclasses in the last section(Inheritance). RPG is a directory which stores the py files.

the code challenge that comes after this video and which asks to override the class str to translate - to dash and . to dot doesn't seem to work in the challenge box but works just fine on my machine: has anyone faced this same problem? i wonder what answer they're looking for. they don't say

def __str__(self):
    if self.pattern:
        return '-'.join(['dot' if e == '.' else 'dash' if e == '-' else e for e in self.pattern])