### Non-uniform parameter with colon notation?

Posted:

**Wed Jul 31, 2024 10:31 am**Hello,

In HOC, I was used to write something like
which would yield an interpolated diameter between 2 and 1 accross the section's segments.

But I am not able to find the way to do this in Python! Any similar syntax that I tried gives an invalid syntax error. I have looked a lot in the documentation and in the forums but I cannot get to this 'colon notation' equivalent.

I know I can do something like
but I wish I was able to use the more compact and straightforward colon thing (so I don't have to figure out the correct interpolation expression!).

Is there a way to do that in Python?

Thank you in advance.

In HOC, I was used to write something like

Code: Select all

```
section diam(0:1) = 2.0:1.0
```

But I am not able to find the way to do this in Python! Any similar syntax that I tried gives an invalid syntax error. I have looked a lot in the documentation and in the forums but I cannot get to this 'colon notation' equivalent.

I know I can do something like

Code: Select all

```
for seg in section:
seg.diam = <some interpolating formula>
```

Is there a way to do that in Python?

Thank you in advance.