-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI, staticmethod, string, list, dict, way more
- Loading branch information
FIRST_NAME LAST_NAME
authored and
FIRST_NAME LAST_NAME
committed
Jul 8, 2023
1 parent
3048078
commit 156eab7
Showing
30 changed files
with
253 additions
and
35 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
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
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,31 @@ | ||
--// Compiled using Roblox.py \\-- | ||
|
||
|
||
------------------------------------ BUILT IN ------------------------------- | ||
local stringmeta, list, dict, staticmethod, class, range, __name__, len, abs, str, int, sum, max, min, reversed, split, round, all, any, ord, char, callable, zip, float, format, hex, id, map = unpack(require(game.ReplicatedStorage["Roblox.py"])(script)) | ||
----------------------------------------------------------------------------- | ||
local Example = class(function(Example) | ||
function Example.__init__(self, name) | ||
self.name = name | ||
end | ||
function Example.print_name(self) | ||
print(self.name) | ||
end | ||
function Example.sethobby(self, hobby) | ||
self.hobby = hobby | ||
end | ||
function Example.printhobby(self) | ||
print(self.hobby) | ||
end | ||
function Example.setage(self, age) | ||
self.age = age | ||
end | ||
function Example.printage(self) | ||
print(self.age) | ||
end | ||
return Example | ||
end, {}) | ||
local new = Example(stringmeta "John") | ||
new.print_name() | ||
new.sethobby(stringmeta "Roblox Game Development") | ||
new.printhobby() |
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,24 @@ | ||
class Example: | ||
def __init__(self, name): | ||
self.name = name | ||
|
||
def print_name(self): | ||
print(self.name) | ||
|
||
def sethobby(self, hobby): | ||
self.hobby = hobby | ||
|
||
def printhobby(self): | ||
print(self.hobby) | ||
|
||
def setage(self, age): | ||
self.age = age | ||
|
||
def printage(self): | ||
print(self.age) | ||
|
||
|
||
new = Example("John") | ||
new.print_name() | ||
new.sethobby("Roblox Game Development") | ||
new.printhobby() |
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,14 @@ | ||
--// Compiled using Roblox.py \\-- | ||
|
||
|
||
------------------------------------ BUILT IN ------------------------------- | ||
local stringmeta, list, dict, staticmethod, class, range, __name__, len, abs, str, int, sum, max, min, reversed, split, round, all, any, ord, char, callable, zip, float, format, hex, id, map = unpack(require(game.ReplicatedStorage["Roblox.py"])(script)) | ||
----------------------------------------------------------------------------- | ||
local newdict = dict {} | ||
local newdict[stringmeta "one"] = 1 | ||
local newdict[stringmeta "two"] = 2 | ||
local newdict[stringmeta "three"] = 3 | ||
local newdict[stringmeta "four"] = 4 | ||
for key in newdict do | ||
print(key, newdict[key]) | ||
end |
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,8 @@ | ||
newdict = {} | ||
newdict['one'] = 1 | ||
newdict['two'] = 2 | ||
newdict['three'] = 3 | ||
newdict['four'] = 4 | ||
|
||
for key in newdict: | ||
print(key, newdict[key]) |
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,7 @@ | ||
--// Compiled using Roblox.py \\-- | ||
|
||
|
||
------------------------------------ BUILT IN ------------------------------- | ||
local stringmeta, list, dict, staticmethod, class, range, __name__, len, abs, str, int, sum, max, min, reversed, split, round, all, any, ord, char, callable, zip, float, format, hex, id, map = unpack(require(game.ReplicatedStorage["Roblox.py"])(script)) | ||
----------------------------------------------------------------------------- | ||
print(stringmeta "Hello World!") |
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 @@ | ||
print("Hello World!") |
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,17 @@ | ||
--// Compiled using Roblox.py \\-- | ||
|
||
|
||
------------------------------------ BUILT IN ------------------------------- | ||
local stringmeta, list, dict, staticmethod, class, range, __name__, len, abs, str, int, sum, max, min, reversed, split, round, all, any, ord, char, callable, zip, float, format, hex, id, map = unpack(require(game.ReplicatedStorage["Roblox.py"])(script)) | ||
----------------------------------------------------------------------------- | ||
local newlist = list {1, 2, 3, 4, 5} | ||
newlist.append(6) | ||
newlist.append(7) | ||
newlist.append(8) | ||
for item in newlist do | ||
print(item) | ||
end | ||
print(newlist[0]) | ||
print(newlist[1]) | ||
newlist.sort() | ||
newlist.reverse() |
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,13 @@ | ||
newlist = [1, 2, 3, 4, 5] | ||
newlist.append(6) | ||
newlist.append(7) | ||
newlist.append(8) | ||
|
||
for item in newlist: | ||
print(item) | ||
|
||
print(newlist[0]) | ||
print(newlist[1]) | ||
|
||
newlist.sort() | ||
newlist.reverse() |
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,9 @@ | ||
--// Compiled using Roblox.py \\-- | ||
|
||
|
||
------------------------------------ BUILT IN ------------------------------- | ||
local stringmeta, list, dict, staticmethod, class, range, __name__, len, abs, str, int, sum, max, min, reversed, split, round, all, any, ord, char, callable, zip, float, format, hex, id, map = unpack(require(game.ReplicatedStorage["Roblox.py"])(script)) | ||
----------------------------------------------------------------------------- | ||
local item = stringmeta "Hello!" | ||
local location = id(item) | ||
print(location) |
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,4 @@ | ||
item = "Hello!" | ||
location = id(item) | ||
|
||
print(location) |
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,16 @@ | ||
--// Compiled using Roblox.py \\-- | ||
|
||
|
||
------------------------------------ BUILT IN ------------------------------- | ||
local stringmeta, list, dict, staticmethod, class, range, __name__, len, abs, str, int, sum, max, min, reversed, split, round, all, any, ord, char, callable, zip, float, format, hex, id, map = unpack(require(game.ReplicatedStorage["Roblox.py"])(script)) | ||
----------------------------------------------------------------------------- | ||
local function foo(x) | ||
print((math.fmod(stringmeta "executing foo(%s)", x))) | ||
end | ||
foo = staticmethod(foo) | ||
local A = class(function(A) | ||
A.foo = foo | ||
return A | ||
end, {}) | ||
local a = A() | ||
a.foo(stringmeta "hi") |
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,9 @@ | ||
@staticmethod | ||
def foo(x): | ||
print("executing foo(%s)" % (x)) | ||
|
||
class A: | ||
foo = foo | ||
|
||
a = A() | ||
a.foo('hi') |
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,8 @@ | ||
--// Compiled using Roblox.py \\-- | ||
|
||
|
||
------------------------------------ BUILT IN ------------------------------- | ||
local stringmeta, list, dict, staticmethod, class, range, __name__, len, abs, str, int, sum, max, min, reversed, split, round, all, any, ord, char, callable, zip, float, format, hex, id, map = unpack(require(game.ReplicatedStorage["Roblox.py"])(script)) | ||
----------------------------------------------------------------------------- | ||
local newstring = stringmeta "Hello World" | ||
print(newstring) |
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,2 @@ | ||
newstring = 'Hello World' | ||
print(newstring) |