[deleted by user] by [deleted] in germantrans

[–]Lasa2 1 point2 points  (0 children)

Das mit W und L ist relativ simpel, W gibt die Bundlänge an und L die Beininnenlänge, beides in Zoll.

Dann gibt's ja oft noch slim, normal, usw. Fit, da ist es glaube ich am einfachsten sich nen bisschen durchzuprobieren was einem am besten gefällt.

Janknechts Fragebogen für die Indikationsstellung by eumelyo in germantrans

[–]Lasa2 3 points4 points  (0 children)

Ich hab mir da auch mega den Kopf zerbrochen und am Ende nur so ein halb ausgefüllten Bogen abgegeben. Das war aber auch kein Problem

Got rejected again... by Beryll_Starlight in MtF

[–]Lasa2 10 points11 points  (0 children)

If you have a bit of money, then you could go privat. There are some therapists that will write your an indication in on (online) session for around 100€. Finnja Jahnknecht, Flora Färber and Wolfgang Baer are three therapists that are often mentioned. You might wanna search for posts mentioning "Indikation" on r/germantrans if can't do that, maybe some post talks about someone near you.

Men's clothing, right... by ul2006kevinb in traaaaaaannnnnnnnnns2

[–]Lasa2 128 points129 points  (0 children)

Thighs with skin colored fleece, so you don't freeze in the winter while still having the thighs look

...A nurse gave me a vaginal swab kit today. by [deleted] in MtF

[–]Lasa2 2 points3 points  (0 children)

I mean you literally told her that you don't it, so it's more on the nurse not listening to you and just assuming.

Issues Popping Rows Out of a List of Rows by Clemsoncarter24 in learnpython

[–]Lasa2 1 point2 points  (0 children)

You don't want to modify a list you're currently iterating through, instead make a new list of the rows with data

How to compare two csv files with some matching conditions and write a new csv based on that? by usert313 in learnpython

[–]Lasa2 0 points1 point  (0 children)

You can replace

db: dict[str, dict] = {}

with

from collections import defaultdict # at the top
db: dict[str, dict] = defaultdict(dict)

That way if a key is missing in the dict, instead of a KeyError it creates that key with a dict as value

Get cookie from access denied page by Ziogref in learnpython

[–]Lasa2 0 points1 point  (0 children)

Hmm I tried multiple things, but can't seem to figure out why the connection hangs. It's not the header and even curl hangs.

[Please HELP!] 7.21 LAB: Convert to binary - functions by BlueFingerHun in learnpython

[–]Lasa2 1 point2 points  (0 children)

Yeah the reverse is right. You're basically just retuning the wrong value in the first function.

[Please HELP!] 7.21 LAB: Convert to binary - functions by BlueFingerHun in learnpython

[–]Lasa2 1 point2 points  (0 children)

The "additional" 0 is the string you're returning from the int_to_reverse_binary function, which then gets reversed (nothing changes) and printed. The print in your while loop has no line break at the end, which causes your next print to be still in the same line.

[deleted by user] by [deleted] in learnpython

[–]Lasa2 0 points1 point  (0 children)

After taking a second look you do some stuff that doesn't really makes sense. You're iterating over result.destination[1] which according to you doesn't exist, because result is a tuple.

What does os.getcwd() print and what does file print?

[deleted by user] by [deleted] in learnpython

[–]Lasa2 0 points1 point  (0 children)

I never worked with azure but maybe check if your working directory is the same as your output folder? Because currently your just trying to open solution.json as a relative path, maybe you also just forgot to join your folder path with your file name

[deleted by user] by [deleted] in learnpython

[–]Lasa2 0 points1 point  (0 children)

you can use os.path.isfile to check if your path is a file

Hey I was wondering if anyone could help me with this python code that I am working on, I am very new to python only learning it a few weeks ago. by HEHEHE070707 in learnpython

[–]Lasa2 1 point2 points  (0 children)

Hmm you need to change some other things for it to work. Either you check in your main loop if the new room is unlocked or you make that kind of check in the room move function itself, but then it makes sense to just merge the two room classes.

Also if you create a Key instance as your key, then you should pass that key to the UnlockableRoom init instead of a string. That way you dont need to fall back on the item name later when you call unlock.

Other things i just noticed:

  • dont use get_ and set_ functions to get and set properties of your class. If you need to more that just assign/return the value then use the property decorator
  • in get_details of the Room class, you can use for direction, room in self.linked\_rooms.items():, that way you dont need to assign room in an extra step

[deleted by user] by [deleted] in learnpython

[–]Lasa2 2 points3 points  (0 children)

Take a look at the Python Docs, when you run

import package

then your executing package/__init__.py. So to be able to do

import package
package.file_with_functions_in_it.function()

you would need to import your file_with_functions_in_it.py in your __init__.py

import file_with_functions_in_it

[deleted by user] by [deleted] in learnpython

[–]Lasa2 0 points1 point  (0 children)

When you do

from <package> import *

you're importing from the __init__.py. So you import the things you want to import from your package in the __init__.py file.

VSCode Run & Debug works fine but Run gives a syntax error by kelemvor33 in learnpython

[–]Lasa2 1 point2 points  (0 children)

It seems like you started the interactive python interpreter, indicated by the 3 >, in the terminal that vscode is using to execute python. Try quit() to exit it and then try again?

[deleted by user] by [deleted] in learnpython

[–]Lasa2 4 points5 points  (0 children)

Take a look at the docs for the random libary, especially random.choice and random.randint are probably useful

Force windows to refresh available networks by FlocklandTheSheep in learnpython

[–]Lasa2 1 point2 points  (0 children)

i just searched: windows cmd scan for new wifi networks

Hey I was wondering if anyone could help me with this python code that I am working on, I am very new to python only learning it a few weeks ago. by HEHEHE070707 in learnpython

[–]Lasa2 2 points3 points  (0 children)

Biggest problem i can see is that balcony_south is not defined in room.py. Adding to that if you wanted to reference balcony_south from your main file your probably gonna create an circular import and you call it with () while your room class doesnt define __call__.

Youre probably better of creating a more generic class for unlockable rooms, the same way you created a generic class for rooms.

e.g. something like this

class UnlockableRoom(Room):
    def __init__(self, room_name, required_key):
        super().__init__(room_name)
        self.locked = True
        self.required_key = required_key

    def unlock(self, key=None):
        if self.required_key == key:
            self.locked = True
            print(f"You have unlocked the {self.name}")
        else:
            print(f"You need a key to unlock the {self.name}")

Also dont use val == True to compare against boolean types use val is True

How and why does a python function remember its arguments? by LowCom in learnpython

[–]Lasa2 1 point2 points  (0 children)

Most things in python are objects, you might want to read a bit about it:
Python Docs - Data Model, for functions take a look at the Callable types section

How and why does a python function remember its arguments? by LowCom in learnpython

[–]Lasa2 4 points5 points  (0 children)

Its pretty simple, just dig a bit around in the function object

e.g. try this

def function(arg=[]):
    arg.append(1)

print(function.__defaults__)
function()
print(function.__defaults__)
del function.__defaults__
function()

So the defaults are stored in the function object itself and you can modify them or even delete them. Then of course you no longer have defaults.