A
A
Alexey Poloz2017-04-02 20:01:38
Python
Alexey Poloz, 2017-04-02 20:01:38

Python Is there any point to such an abbreviation?

It makes sense to replace this:

i.speech=p.POS
i.gender=p.gender
i.case=p.case
i.number=p.number

on this:
i.speech,i.gender,i.case,i.number=p.POS,p.gender,p.case,p.number

Or is it already completely perverse / works longer / not readable?
Or are there better ways to do multiple equalization?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sim3x, 2017-04-02
@sim3x

Not readable
Something strange in the code - this should not happen

R
RedHairOnMyHead, 2017-04-02
@ThePyzhov

For readability, I would write it like this:

i.speech  = p.POS
i.gender  = p.gender
i.case    = p.case
i.number  = p.number

D
Dimonchik, 2017-04-02
@dimonchik2013

if you want in a line, it's better

i.speech=p.POS; i.gender=p.gender; i.case=p.case; i.number=p.number

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question