Well it almost is I think... I was thinking that I could have something like the 'B' typecode but then tests such as pytest.raises(TypeError, a.append, 7) won't actually pass. Should I just change my tests here as well?
Thinking about it more I guess I really should change to 'B' because the old python 2 style strings aren't a good idea in this context.
Can someone tell me what Python function/syntax is used here: [c.lower(),c.upper()][c in 'aeiouy'] ? It capitalizes vowels but I have absolutely no idea how that works
Lining myself up for a "what happens when you try it," but am I right in assuming that the backref/relationship system in sqlalchemy does an enforcement of FKs in code vs at the DB layer?
Someone just asked me to post my clarifying comment as an answer so they could accept it. So what do I do? I find an existing question with a more robust answer, and dupehammer. >=}
user559633
23:46
by "enforce" i meant enforcement of the FK constraint
user559633
@TigerhawkT3 Yeah, way to show that person looking to reward you for your help. TALK ABOUT OWNED
user559633
also, sorry in advance @davidism, the little respect and patience you have for me is about to go out the window this month as i try to actually understand what i'm doing with sqlalchemy instead of copy/paste idioms until the pain stops
@tristan sqlalchemy doesn't enforce foreign keys generally, although it lets you specify cascades for them
this may have changed, but sqlite doesn't enforce them either by default
user559633
23:52
@AaronHall sniggers
user559633
@davidism Yeah, exactly, I wasn't sure if I was looking at a sqlite thing or a sqlalchemy thing.
user559633
@AaronHall To actually be helpful, please just ask the question
user559633
The room rule is there both so the regulars aren't annoyed and because it helps you get answers faster
user559633
Say that I use the relationship system and declare a backref. I assume that it's not going to create a many-to-many mapping table automagically, but in postgres (or mysql), will this do a FK constraint or is it just enforced in python?
I'm trying to use a __main__.py in my package. I'm trying to get my imports correct. I tweak, tweak, tweak, and it seems like it works and then it doesn't.
Oooh - there are some fun quirks of importing during initialisation from your own package. Patrick investigated them fairly recently iirc. Have you got some deep nesting going on?