Python Forum
Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Statement has no effect"
#15
#1 I actually just copied it from my game, which i saved the JSON in a directory called save. And i didnt bother to change it.

#2 no. Once you load the json data, that is basically a dictionary. Im not sure why you have such as problem with using global variables VS dictionary keys? It does not pollute your namespace, and is much simpler to load/save. You also dont need to change the save/loading code if you add or remove a key, whereas you have to if you use variables as in your initial post. Less modification of code is less chance of bugs.

#3 in my example it is named "database{}".format(sys.version.split()[0]) which if your using python2.7.12 then the database name will be "database2.7.12", if your using python3.6.0 then your database name would be "database3.6.0".
Recommended Tutorials:
Reply


Messages In This Thread
"Statement has no effect" - by birdieman - Jan-25-2017, 02:36 AM
RE: "Statement has no effect" - by Mekire - Jan-25-2017, 02:52 AM
RE: "Statement has no effect" - by birdieman - Jan-25-2017, 02:59 AM
RE: "Statement has no effect" - by metulburr - Jan-25-2017, 03:04 AM
RE: "Statement has no effect" - by Mekire - Jan-25-2017, 03:17 AM
RE: "Statement has no effect" - by snippsat - Jan-25-2017, 03:55 AM
RE: "Statement has no effect" - by birdieman - Jan-25-2017, 01:35 PM
RE: "Statement has no effect" - by metulburr - Jan-25-2017, 01:40 PM
RE: "Statement has no effect" - by Kebap - Jan-25-2017, 03:56 PM
RE: "Statement has no effect" - by birdieman - Jan-25-2017, 08:38 PM
RE: "Statement has no effect" - by Mekire - Jan-25-2017, 11:40 PM
RE: "Statement has no effect" - by metulburr - Jan-25-2017, 11:47 PM
RE: "Statement has no effect" - by birdieman - Jan-26-2017, 12:57 AM
RE: "Statement has no effect" - by snippsat - Jan-26-2017, 01:37 AM
RE: "Statement has no effect" - by metulburr - Jan-26-2017, 01:38 AM
RE: "Statement has no effect" - by Ofnuts - Jan-26-2017, 02:40 PM
RE: "Statement has no effect" - by metulburr - Jan-26-2017, 03:25 PM
RE: "Statement has no effect" - by birdieman - Jan-27-2017, 12:56 AM
RE: "Statement has no effect" - by metulburr - Jan-27-2017, 01:16 AM
RE: "Statement has no effect" - by birdieman - Jan-27-2017, 01:29 AM
RE: "Statement has no effect" - by metulburr - Jan-27-2017, 01:40 AM
RE: "Statement has no effect" - by Larz60+ - Jan-27-2017, 02:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Copying methods to effect the new owner instead of the old instance Daniel285 2 173 Yesterday, 07:58 AM
Last Post: Gribouillis
  Printing effect sizes for variables in an anova eyavuz21 2 1,066 Feb-01-2023, 02:12 PM
Last Post: eyavuz21
  Help with TypeWriter Effect in Python Rich Extra 0 1,265 May-23-2022, 09:44 PM
Last Post: Extra
  Rotation Effect on live Webcam Feed Leziiy 0 1,664 Sep-12-2020, 04:25 PM
Last Post: Leziiy
  How to fix statement seems to have no effect hernancrespo89 0 6,958 Jan-23-2020, 09:23 PM
Last Post: hernancrespo89
  strange effect from duplicating a file descriptor Skaperen 1 2,118 Feb-18-2019, 08:20 PM
Last Post: Skaperen
  Algorithm effect on the CPU Faruk 3 2,698 Dec-19-2018, 08:57 AM
Last Post: Faruk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020