Python Forum
can't assign to literal error in pycharm - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: can't assign to literal error in pycharm (/thread-21601.html)



can't assign to literal error in pycharm - ryder5227 - Oct-07-2019

class Flee(Action):
    def __init__(self, method: object, name: object, hotkey: object, kwargs: object) -> object:
        """

        :rtype: object
        """
        super().__init__(method, name, hotkey, kwargs)
        super().__init(method=player.Player.)not, name= "Flee", hotkey= 'f')
Can't assign to literal on line 6


RE: can't assign to literal error in pycharm - micseydel - Oct-07-2019

You should provide fully-runnable code that reproduces the issue. You should leave out things like the docstring (and maybe even the annotations, especially if they're just object) to keep it as minimal as possible.

Also, on line 8 that's clearly not legal syntax.


RE: can't assign to literal error in pycharm - Bmart6969 - Oct-07-2019

try backing your triple quotation marks back to your object on line 5