-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Berezin
committed
Jun 25, 2019
1 parent
e37a1e3
commit b207b35
Showing
3 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class Doughnut(): | ||
def __init__(this, name): | ||
this.name = name | ||
def cook(this): | ||
name = "" | ||
if this.name: | ||
name = this.name + " " | ||
print "You fry the " + name + "Doughnut until golden brown." | ||
class BostonCream(Doughnut): | ||
def __init__(this): | ||
Doughnut.__init__(this, "Boston Cream") | ||
Doughnut("Cruller").cook() | ||
BostonCream().cook() | ||
def hello(): | ||
print "Would you like some breakfast?" | ||
print BostonCream | ||
print Doughnut | ||
print BostonCream() | ||
print hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ const { | |
Call, | ||
Literal, | ||
While, | ||
// @TODO: Support Classes | ||
Class, | ||
Get, | ||
Set: SetExpr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters