Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] !?

[DiscordArchive] !?

[DiscordArchive] !?

Pages (5): Previous 1 2 3 4 5 Next
rektbyfaith
Administrator
0
06-03-2018, 08:35 PM
#31
Archived author: Skarn • Posted: 2018-06-03T20:35:18.266000+00:00
Original source

```py
class SomeClass:
var = 'I need help with fixed_point Sad'
@classmethod
def something(cls):
print(cls.var)

if __name__ == '__main__':
SomeClass.something()

```4
rektbyfaith
06-03-2018, 08:35 PM #31

Archived author: Skarn • Posted: 2018-06-03T20:35:18.266000+00:00
Original source

```py
class SomeClass:
var = 'I need help with fixed_point Sad'
@classmethod
def something(cls):
print(cls.var)

if __name__ == '__main__':
SomeClass.something()

```4

rektbyfaith
Administrator
0
06-03-2018, 08:35 PM
#32
Archived author: Skarn • Posted: 2018-06-03T20:35:30.436000+00:00
Original source

The example of using a class without instantiation
rektbyfaith
06-03-2018, 08:35 PM #32

Archived author: Skarn • Posted: 2018-06-03T20:35:30.436000+00:00
Original source

The example of using a class without instantiation

rektbyfaith
Administrator
0
06-03-2018, 08:35 PM
#33
Archived author: Kavligula • Posted: 2018-06-03T20:35:46.122000+00:00
Original source

It's instantiated behind the scenes and then deleted by the garbage collector later
rektbyfaith
06-03-2018, 08:35 PM #33

Archived author: Kavligula • Posted: 2018-06-03T20:35:46.122000+00:00
Original source

It's instantiated behind the scenes and then deleted by the garbage collector later

rektbyfaith
Administrator
0
06-03-2018, 08:35 PM
#34
Archived author: Kavligula • Posted: 2018-06-03T20:35:57.382000+00:00
Original source

The object is still created and used, it's just not shown to you that that's happening
rektbyfaith
06-03-2018, 08:35 PM #34

Archived author: Kavligula • Posted: 2018-06-03T20:35:57.382000+00:00
Original source

The object is still created and used, it's just not shown to you that that's happening

rektbyfaith
Administrator
0
06-03-2018, 08:36 PM
#35
Archived author: Skarn • Posted: 2018-06-03T20:36:01.692000+00:00
Original source

It is neither instantiated, nor deleted
rektbyfaith
06-03-2018, 08:36 PM #35

Archived author: Skarn • Posted: 2018-06-03T20:36:01.692000+00:00
Original source

It is neither instantiated, nor deleted

rektbyfaith
Administrator
0
06-03-2018, 08:36 PM
#36
Archived author: Skarn • Posted: 2018-06-03T20:36:14.872000+00:00
Original source

Classes are objects in python
rektbyfaith
06-03-2018, 08:36 PM #36

Archived author: Skarn • Posted: 2018-06-03T20:36:14.872000+00:00
Original source

Classes are objects in python

rektbyfaith
Administrator
0
06-03-2018, 08:36 PM
#37
Archived author: Skarn • Posted: 2018-06-03T20:36:21.847000+00:00
Original source

They are instances of their metaclass
rektbyfaith
06-03-2018, 08:36 PM #37

Archived author: Skarn • Posted: 2018-06-03T20:36:21.847000+00:00
Original source

They are instances of their metaclass

rektbyfaith
Administrator
0
06-03-2018, 08:37 PM
#38
Archived author: Skarn • Posted: 2018-06-03T20:37:10.288000+00:00
Original source

which is also an object which is either PyObject called 'type', the default metaclass or a custom user-defined metaclass which determine the way its classes are created.
rektbyfaith
06-03-2018, 08:37 PM #38

Archived author: Skarn • Posted: 2018-06-03T20:37:10.288000+00:00
Original source

which is also an object which is either PyObject called 'type', the default metaclass or a custom user-defined metaclass which determine the way its classes are created.

rektbyfaith
Administrator
0
06-03-2018, 08:37 PM
#39
Archived author: Kavligula • Posted: 2018-06-03T20:37:29.135000+00:00
Original source

So then the class is still technically instantiated, it's just done at runtime
rektbyfaith
06-03-2018, 08:37 PM #39

Archived author: Kavligula • Posted: 2018-06-03T20:37:29.135000+00:00
Original source

So then the class is still technically instantiated, it's just done at runtime

rektbyfaith
Administrator
0
06-03-2018, 08:37 PM
#40
Archived author: Kavligula • Posted: 2018-06-03T20:37:45.910000+00:00
Original source

Because it itself is just an object of an earlier class
rektbyfaith
06-03-2018, 08:37 PM #40

Archived author: Kavligula • Posted: 2018-06-03T20:37:45.910000+00:00
Original source

Because it itself is just an object of an earlier class

Pages (5): Previous 1 2 3 4 5 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)