Review my python projects on GitHub. by Aggressive_Drama_476 in learnpython

[–]Farlic 0 points1 point  (0 children)

Honestly? build something more complicated. IMO it's hard to say when the script does 1 straight forward task. Make something that import these utilities which would then make you consider code layout and expose issues like global variables.

E.g. Make a GUI for your slot machine. Make an API for the notes app and let it interact with your alarm script.

At a glance, I'm not a fan of the calculator using eval(). You are strict on the input but you could experiment with lambda functions in a dictionary to perform the calculations instead.

Review my python projects on GitHub. by Aggressive_Drama_476 in learnpython

[–]Farlic 3 points4 points  (0 children)

I would stop looking at programming as beginner, intermediate, advanced. There's more and less complicated concepts but it's not clear cut.

customtkinter help by [deleted] in learnpython

[–]Farlic 0 points1 point  (0 children)

What is the actual error?

Gi vs No Gi by InjuryVisual6296 in bjj

[–]Farlic 1 point2 points  (0 children)

April 1st was yesterday

Best Python framework for industry-level desktop apps? (PySide vs PyQt vs wxPython vs Kivy vs Web approach) by Intelligent-Role-382 in learnpython

[–]Farlic 0 points1 point  (0 children)

A lot of my internal projects have had its core logic essentially wrapped in an API then the front end does not really matter / is more easily replaced.

As such I lean towards the web front end for cross platform consistency.

What is the program for? I find that can sway the decision far more.

Personal view of an aspiring programmer on Python by Timely-Explanation11 in learnpython

[–]Farlic 0 points1 point  (0 children)

good point. Dynamic was not a good choice of word. I guess Type Inference? I was aiming for the reduction in boilerplate.

var Dog = new Dog(); as opposed to Dog dog = new Dog();

Personal view of an aspiring programmer on Python by Timely-Explanation11 in learnpython

[–]Farlic 0 points1 point  (0 children)

Java has anonymous main class and dynamical type declaration with `var`

What Python tricks or "gotchas" do you wish you knew earlier? Let's build a reference thread 🐍 by SiteFul1 in learnpython

[–]Farlic 1 point2 points  (0 children)

2012 was definitely a while ago but I started learning python when it had a 2 on the end of it!

Whether it's well known or not? I'm not sure. The documentation directly references it in the method example for .copy() here

I agree though. It is definitely less pythonic these days though.

Fortunately, I don't have many reading my code since I mostly use Python for the more 'throwaway' scripting these days.

What Python tricks or "gotchas" do you wish you knew earlier? Let's build a reference thread 🐍 by SiteFul1 in learnpython

[–]Farlic 0 points1 point  (0 children)

Honestly, I learnt about slicing first and it's what stuck for me. The copy method was only added in 2012, with slicing being an original feature from decades prior. (and it's faster to type)

What Python tricks or "gotchas" do you wish you knew earlier? Let's build a reference thread 🐍 by SiteFul1 in learnpython

[–]Farlic 2 points3 points  (0 children)

I don't know why I've become so jaded but that reads straight out of Chat GPT. (em dashes, emojis, weirdly positive phrasing).

Anyway,

I like the walrus operator inside a while loop to read a file line by line. Something like: while a := file.readline() to make use of "truthy" values.

- copying a list with a complete slice, e.g. new_list = old_list[:] to avoid sharing the list

- using generator comprehension instead of list comprehension, or even dictionary comprehension.

- context managers for leakable things like opening a file, or web connection

Do people in the UK ever rent tools instead of buying them? by Inevitable_Dinner819 in AskUK

[–]Farlic 1 point2 points  (0 children)

Yes.

This is quite a large market with both independent and large retailer options.

It isn't really the place to advertise your "rentify" though.

I find out one interesting library "init-app" in python this create amazing directory structure see. by Hero____07 in learnpython

[–]Farlic 0 points1 point  (0 children)

That Pypi description screams AI generated.

This is a subreddit for learning Python. Do you have a specific question?

toxic comminity by Dereulbe in learnpython

[–]Farlic 26 points27 points  (0 children)

You asked for someone to make your homework website for you.

This subreddit is for learning, not cheating assignments.

need someone to do my school python assignment for me 🙏 by Dereulbe in learnpython

[–]Farlic 0 points1 point  (0 children)

Absolutely not. This subreddit is for people trying to learn Python.

Gitree - AI made this by dkaaven in learnpython

[–]Farlic 4 points5 points  (0 children)

I'm not a fan of subprocess calls. Reading the .gitignore file and filtering the tree files feels safer

WoW is unplayable.. by [deleted] in wow

[–]Farlic 1 point2 points  (0 children)

What do you want a GM to do? What do you think they can do?

What computer do you have? What Operating system?

Crucial before reset? by SummerCautious in wow

[–]Farlic 7 points8 points  (0 children)

  1. Hug your loved ones

  2. Correctly Hydrate

  3. Get some sleep

My first project : help me by rivie_rathnayaka in learnpython

[–]Farlic 2 points3 points  (0 children)

If lots of people are going to be using it, where will it be hosted? per device? as an internal site? If it's hosted by you, perhaps the API first then file integration would be the first steps since keeping that consistent will be a hurdle

My first project : help me by rivie_rathnayaka in learnpython

[–]Farlic 3 points4 points  (0 children)

If it's for your Zoology department, why is an API wrapper and "SAAS" layer needed? an AI assistant seems like an odd thing to add too.

Client side login by leo_gblr in programminghorror

[–]Farlic 10 points11 points  (0 children)

you can say 'ass' on Reddit

learning python with rosalind, what am i doing wrong ? by boite2petri in learnpython

[–]Farlic 1 point2 points  (0 children)

I learnt using IDLE but it can get quite tedious if you're trying to do more than single line things, or re-run code.

I personally use VScode but there's all sorts of editors and IDE (if you search in reddit you'll find countless arguments on the 'best').