Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] <@456226577798135808> what is it?

[DiscordArchive] <@456226577798135808> what is it?

[DiscordArchive] <@456226577798135808> what is it?

Pages (4): Previous 1 2 3 4
rektbyfaith
Administrator
0
10-20-2018, 08:55 AM
#31
Archived author: Skarn • Posted: 2018-10-20T08:55:52.414000+00:00
Original source

That is the part of python I really hate tbh
rektbyfaith
10-20-2018, 08:55 AM #31

Archived author: Skarn • Posted: 2018-10-20T08:55:52.414000+00:00
Original source

That is the part of python I really hate tbh

rektbyfaith
Administrator
0
10-20-2018, 08:56 AM
#32
Archived author: Skarn • Posted: 2018-10-20T08:56:05.024000+00:00
Original source

But it is a downside of ducktyping
rektbyfaith
10-20-2018, 08:56 AM #32

Archived author: Skarn • Posted: 2018-10-20T08:56:05.024000+00:00
Original source

But it is a downside of ducktyping

rektbyfaith
Administrator
0
10-20-2018, 08:57 AM
#33
Archived author: Deleted User • Posted: 2018-10-20T08:57:56.834000+00:00
Original source

im trying something like this:
rektbyfaith
10-20-2018, 08:57 AM #33

Archived author: Deleted User • Posted: 2018-10-20T08:57:56.834000+00:00
Original source

im trying something like this:

rektbyfaith
Administrator
0
10-20-2018, 08:58 AM
#34
Archived author: Deleted User • Posted: 2018-10-20T08:58:00.283000+00:00
Original source

```python
def exists(self, file):
if type(file) is str:
return self.c_casc.fileExists(str(file))
elif type(file) is int:
return self.c_casc.fileDataIdExists(int(file))
else:
raise ValueError('file must be either string or int')
```
rektbyfaith
10-20-2018, 08:58 AM #34

Archived author: Deleted User • Posted: 2018-10-20T08:58:00.283000+00:00
Original source

```python
def exists(self, file):
if type(file) is str:
return self.c_casc.fileExists(str(file))
elif type(file) is int:
return self.c_casc.fileDataIdExists(int(file))
else:
raise ValueError('file must be either string or int')
```

rektbyfaith
Administrator
0
10-20-2018, 08:58 AM
#35
Archived author: Deleted User • Posted: 2018-10-20T08:58:26.991000+00:00
Original source

probably the casts are not required
rektbyfaith
10-20-2018, 08:58 AM #35

Archived author: Deleted User • Posted: 2018-10-20T08:58:26.991000+00:00
Original source

probably the casts are not required

rektbyfaith
Administrator
0
10-20-2018, 08:59 AM
#36
Archived author: Skarn • Posted: 2018-10-20T08:59:34.830000+00:00
Original source

Yes
rektbyfaith
10-20-2018, 08:59 AM #36

Archived author: Skarn • Posted: 2018-10-20T08:59:34.830000+00:00
Original source

Yes

rektbyfaith
Administrator
0
10-20-2018, 08:59 AM
#37
Archived author: Skarn • Posted: 2018-10-20T08:59:39.599000+00:00
Original source

No casts
rektbyfaith
10-20-2018, 08:59 AM #37

Archived author: Skarn • Posted: 2018-10-20T08:59:39.599000+00:00
Original source

No casts

rektbyfaith
Administrator
0
10-20-2018, 08:59 AM
#38
Archived author: Skarn • Posted: 2018-10-20T08:59:47.657000+00:00
Original source

Please do not use type()
rektbyfaith
10-20-2018, 08:59 AM #38

Archived author: Skarn • Posted: 2018-10-20T08:59:47.657000+00:00
Original source

Please do not use type()

rektbyfaith
Administrator
0
10-20-2018, 08:59 AM
#39
Archived author: Skarn • Posted: 2018-10-20T08:59:55.102000+00:00
Original source

Use isinstance instead
rektbyfaith
10-20-2018, 08:59 AM #39

Archived author: Skarn • Posted: 2018-10-20T08:59:55.102000+00:00
Original source

Use isinstance instead

rektbyfaith
Administrator
0
10-20-2018, 09:00 AM
#40
Archived author: Skarn • Posted: 2018-10-20T09:00:08.562000+00:00
Original source

That would allow usage of int-like or str-like types
rektbyfaith
10-20-2018, 09:00 AM #40

Archived author: Skarn • Posted: 2018-10-20T09:00:08.562000+00:00
Original source

That would allow usage of int-like or str-like types

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