Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] what do you mean by do until exception?

[DiscordArchive] what do you mean by do until exception?

[DiscordArchive] what do you mean by do until exception?

Pages (5): Previous 1 2 3 4 5 Next
rektbyfaith
Administrator
0
02-11-2018, 11:04 AM
#21
Archived author: Skarn • Posted: 2018-02-11T11:04:55.822000+00:00
Original source

It is not throwing anything
rektbyfaith
02-11-2018, 11:04 AM #21

Archived author: Skarn • Posted: 2018-02-11T11:04:55.822000+00:00
Original source

It is not throwing anything

rektbyfaith
Administrator
0
02-11-2018, 11:05 AM
#22
Archived author: Skarn • Posted: 2018-02-11T11:05:01.635000+00:00
Original source

at least not on python level
rektbyfaith
02-11-2018, 11:05 AM #22

Archived author: Skarn • Posted: 2018-02-11T11:05:01.635000+00:00
Original source

at least not on python level

rektbyfaith
Administrator
0
02-11-2018, 11:05 AM
#23
Archived author: Amaroth • Posted: 2018-02-11T11:05:33.745000+00:00
Original source

*shrug* I guess I am not explaining that correctly, would have to ask my teacher again
rektbyfaith
02-11-2018, 11:05 AM #23

Archived author: Amaroth • Posted: 2018-02-11T11:05:33.745000+00:00
Original source

*shrug* I guess I am not explaining that correctly, would have to ask my teacher again

rektbyfaith
Administrator
0
02-11-2018, 11:05 AM
#24
Archived author: Amaroth • Posted: 2018-02-11T11:05:48.637000+00:00
Original source

But Python is his main language, so he should know this
rektbyfaith
02-11-2018, 11:05 AM #24

Archived author: Amaroth • Posted: 2018-02-11T11:05:48.637000+00:00
Original source

But Python is his main language, so he should know this

rektbyfaith
Administrator
0
02-11-2018, 11:06 AM
#25
Archived author: Skarn • Posted: 2018-02-11T11:06:20.917000+00:00
Original source

afaik iteraitons are done with generator objects. I messed with that stuff a little before when I tried doing async programming
rektbyfaith
02-11-2018, 11:06 AM #25

Archived author: Skarn • Posted: 2018-02-11T11:06:20.917000+00:00
Original source

afaik iteraitons are done with generator objects. I messed with that stuff a little before when I tried doing async programming

rektbyfaith
Administrator
0
02-11-2018, 11:07 AM
#26
Archived author: Skarn • Posted: 2018-02-11T11:07:45.237000+00:00
Original source

as far as I know, when you iterate over something in python, it calls an __iter__ magic method of an iterable object, which returns a generator object
rektbyfaith
02-11-2018, 11:07 AM #26

Archived author: Skarn • Posted: 2018-02-11T11:07:45.237000+00:00
Original source

as far as I know, when you iterate over something in python, it calls an __iter__ magic method of an iterable object, which returns a generator object

rektbyfaith
Administrator
0
02-11-2018, 11:07 AM
#27
Archived author: Skarn • Posted: 2018-02-11T11:07:59.907000+00:00
Original source

I actually overload that magic method in my m2 reading
rektbyfaith
02-11-2018, 11:07 AM #27

Archived author: Skarn • Posted: 2018-02-11T11:07:59.907000+00:00
Original source

I actually overload that magic method in my m2 reading

rektbyfaith
Administrator
0
02-11-2018, 11:10 AM
#28
Archived author: Skarn • Posted: 2018-02-11T11:10:22.393000+00:00
Original source

In M2 we have a lot of M2Array objects. I've done them in a way that there is that actual struct (n_elements, ofs_elements) that is actuall written to the header, and also "values" field with a list of values that were parsed by that adress. So, it'd be fucking horrible if I had to write something like: for sequence in self.m2.sequences.values. So, I overloaded the __iter__ method to return a generator expression of an inner field values. So now you can just do: for sequence in self.m2.sequences: without adressing the values field directly.
rektbyfaith
02-11-2018, 11:10 AM #28

Archived author: Skarn • Posted: 2018-02-11T11:10:22.393000+00:00
Original source

In M2 we have a lot of M2Array objects. I've done them in a way that there is that actual struct (n_elements, ofs_elements) that is actuall written to the header, and also "values" field with a list of values that were parsed by that adress. So, it'd be fucking horrible if I had to write something like: for sequence in self.m2.sequences.values. So, I overloaded the __iter__ method to return a generator expression of an inner field values. So now you can just do: for sequence in self.m2.sequences: without adressing the values field directly.

rektbyfaith
Administrator
0
02-11-2018, 11:10 AM
#29
Archived author: Skarn • Posted: 2018-02-11T11:10:32.880000+00:00
Original source

I don't really see where an exception could be raised there
rektbyfaith
02-11-2018, 11:10 AM #29

Archived author: Skarn • Posted: 2018-02-11T11:10:32.880000+00:00
Original source

I don't really see where an exception could be raised there

rektbyfaith
Administrator
0
02-11-2018, 11:11 AM
#30
Archived author: Skarn • Posted: 2018-02-11T11:11:24.019000+00:00
Original source

Maybe your professor meant the way it is implemented on a C level. Like when generator is asked for providing the next value, and if there is no, it might raise something, yes
rektbyfaith
02-11-2018, 11:11 AM #30

Archived author: Skarn • Posted: 2018-02-11T11:11:24.019000+00:00
Original source

Maybe your professor meant the way it is implemented on a C level. Like when generator is asked for providing the next value, and if there is no, it might raise something, yes

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