﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30660	Use of properites by Django and debugging in PyCharm	piotrdt	nobody	"Hello all, 

It is my first ticket here so sorry if I messed something.

I've met an issue when developing an application with use of PyCharm and Django.
The issue is not top priority because it is related to debug. 

Implementation of some properties by Django e.g. 
{{{
#!python
@cached_property
def forms(self):
}}}
or more common:
{{{
#!python
    def __str__(self):
            return self.as_table()
}}}
does more than just provide access to some property.
Unfortunately PyCharm (and maybe some other python IDE also) evaluates some expressions during debug (e.g. when one wants to see what is the content of the variable)
That leads to strange situations, where content of instance of a class may be changed during debug.

I'm going to create a ticket in PyCharm bug tracker as well. 

My suggestion is to implement properties in a way they do not affect content of an object they belong to.

Best regards,
Piotr P."	Cleanup/optimization	closed	Uncategorized	2.2	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
