Python Forum
Emulate slicing for a method
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Emulate slicing for a method
#3
This works:
class Loc:
    def __getitem__(self, key):
        print(key.start, key.stop, key.step)

class DataFrame:
    def __init__(self, max_frame_length)
        self.max_frame_length = max_frame_length
        self.data = {}
        self.loc = Loc()
Thanks Ichabod!
Reply


Messages In This Thread
Emulate slicing for a method - by heras - Jul-28-2018, 09:14 PM
RE: Emulate slicing for a method - by ichabod801 - Jul-28-2018, 09:33 PM
RE: Emulate slicing for a method - by heras - Jul-28-2018, 10:00 PM
RE: Emulate slicing for a method - by volcano63 - Jul-29-2018, 02:55 PM
RE: Emulate slicing for a method - by ichabod801 - Jul-30-2018, 01:03 AM
RE: Emulate slicing for a method - by heras - Jul-30-2018, 10:36 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020