Python Forum
c as parameter - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Board (https://python-forum.io/forum-26.html)
+--- Thread: c as parameter (/thread-11162.html)

Pages: 1 2


c as parameter - ichabod801 - Jun-26-2018

Say I want to use c as a parameter to function f, like f( c ). If I do it without the spaces, you get f©, which is a little confusing. inline doesn't help, f(c).

def f(c):
    pass
I guess full code markup works, but that would have been excessive in the post I was writing. Is there any way to block this for a particular post? Disable smileys doesn't do it.


RE: c as parameter - snippsat - Jun-26-2018

First time i have seen this behavior,i don't know a way other than using code tag not inline.
Have to look at regex for inline,but as this is the first time this behavior show up and only character c inside () maybe can let it pass.
Maybe a good time to explain that single character as function name and parameter is not best way Wink


RE: c as parameter - ichabod801 - Jun-26-2018

(Jun-26-2018, 08:07 AM)snippsat Wrote: Maybe a good time to explain that single character as function name and parameter is not best way Wink

It was a sort of abstract example of nested functions, so it didn't seem to be worth it. Cry


RE: c as parameter - ljmetzger - Jun-26-2018

Try adding a space before the c. It is not PEP-8 compliant but eliminates the little c.
def f( c):
    #NOTE: Space added before the 'c' due to Bulletin Board limitations (space should not be there)
    pass
Lewis


RE: c as parameter - snippsat - Jun-26-2018

There is no problem inside python tag.
def f(c):    
    pass
For inline a extra space can be used ( c) no space (c).


RE: c as parameter - ichabod801 - Jun-26-2018

Huh


RE: c as parameter - snippsat - Jun-26-2018

Test should be okay now,for now in inline is named icode.
f(c) (c).
@stranac made a plugin a long time ago for code tags,there is inline named icode and it do not have this behavior.
So i think edit the php file and rename should do it,so we have same inline name.
Outside code tags © i don't care about,then have to into source of Rin Editor had a bad run there a while back before i removed WYSIWYG mode Undecided


RE: c as parameter - ichabod801 - Jun-27-2018

f(c). Awesome. Thanks snippsat. Now I just have to remember it.


RE: c as parameter - metulburr - Jul-01-2018

At one point we disabled copyright symbol. I would vote for that option again. I would think the coding issue would occur more than someone needing the copyright symbol.


RE: c as parameter - snippsat - Jul-01-2018

If there is a option to turn copyright symbol off,then just turn it off.