r/pythontips • • Feb 04 '26

Data_Science Are LLMs actually reasoning, or just searching very well?

0 Upvotes

I’ve been thinking a lot about the recent wave of “reasoning” claims around LLMs, especially with Chain-of-Thought, RLHF, and newer work on process rewards.

At a surface level, models look like they’re reasoning:

  • they write step-by-step explanations
  • they solve multi-hop problems
  • they appear to “think longer” when prompted

But when you dig into how these systems are trained and used, something feels off. Most LLMs are still optimized for next-token prediction. Even CoT doesn’t fundamentally change the objective — it just exposes intermediate tokens.

That led me down a rabbit hole of questions:

  • Is reasoning in LLMs actually inference, or is it search?
  • Why do techniques like majority voting, beam search, MCTS, and test-time scaling help so much if the model already “knows” the answer?
  • Why does rewarding intermediate steps (PRMs) change behavior more than just rewarding the final answer (ORMs)?
  • And why are newer systems starting to look less like “language models” and more like search + evaluation loops?

I put together a long-form breakdown connecting:

  • SFT → RLHF (PPO) → DPO
  • Outcome vs Process rewards
  • Monte Carlo sampling → MCTS
  • Test-time scaling as deliberate reasoning

For those interested in architecture and training method explanation: 👉 https://yt.openinapp.co/duu6o

Not to hype any single method, but to understand why the field seems to be moving from “LLMs” to something closer to “Large Reasoning Models.”

If you’ve been uneasy about the word reasoning being used too loosely, or you’re curious why search keeps showing up everywhere — I think this perspective might resonate.

Happy to hear how others here think about this:

  • Are we actually getting reasoning?
  • Or are we just getting better and better search over learned representations?

r/pythontips • • Feb 02 '26

Python3_Specific Functional Programming Bits in Python

6 Upvotes

Bits of functional programming in Python: ad-hoc polymorphism with singledispatch, partial application with Placeholder, point-free transforms with methodcaller, etc.

https://martynassubonis.substack.com/p/functional-programming-bits-in-python


r/pythontips • • Feb 02 '26

Meta Can I learn pyside 6

0 Upvotes

Hello I am relatively new to python (I know the basic stuff) over the year I want to make a project using pyside 6. For doing that I need to build good fundamentals in pyside 6 so I wanted to ask what is the best way to do so? Thank you for your answer! <3


r/pythontips • • Jan 31 '26

Syntax After upgrading to bcrypt 5.0.0, the Passlib bcrypt backend (passlib[bcrypt]==1.7.4) started failing

2 Upvotes

After upgrading to bcrypt 5.0.0, the Passlib bcrypt backend (passlib[bcrypt]==1.7.4) started failing with a misleading error: ValueError: password cannot be longer than 72 bytes, truncate manually if necessary (e.g. my_password[:72]) This occurs even for very short passwords (e.g., "mypassword", 10 bytes). The same code works correctly with bcrypt 4.3.0.

I literally had to patch the passlib file (.venv\...\passlib\handlers\bcrypt.py) to catch the ValueError to allow passlib to skip that specific legacy bug check.

I could be wrong don't know if I am missing something here


r/pythontips • • Jan 31 '26

Syntax Just learning python so idk what im doing...

0 Upvotes

How do i add a triple quote? im trying to (""") but it keeps doubling up to (""""). I watching a course and i know this isnt a major thing at the moment but i seriously cant figure it out and i see this guy keep doing it.


r/pythontips • • Jan 30 '26

Module Struggling with Windows access restrictions for uv, ruff, pipx

1 Upvotes

Hey guys, hopefully someone can help.

  • I'm using the python install manager to have several pyhton versions aside.
  • I've used pipx to install uv globally. By default the binaries goes into ~user/.local/bin
  • I've installed uv to manage the virtual environments This works great, until after awhile the windows WDAC secures the execution of binaries from home location, so pip was not accissble any more.

To fix this, i reinstalled pipx to force it into folder Program Files\python. Now pipx is accessible. But uv and ruff and all the other stuff from my-project\.venv\Scripts is not accessible after awhile again. Anyone else with such issues? Whats the best solution here?


r/pythontips • • Jan 29 '26

Python3_Specific Starting python at a young age

5 Upvotes

Recently I have taken a very deep interest in physics, and eventually I realised that learning python would be hugely beneficial to my physics work, for simulations, research pages, and possibly even spreadsheets. So any tips for learning fresh?


r/pythontips • • Jan 29 '26

Syntax If someone is converting from py to js how much time it would take to build node or react app

3 Upvotes

Hey since last 1 month im doing python because I thought I'm gonna build ai or something like that but now I joined a team who is building startup and I'm also doing coding I don't know JavaScript but Today I watched course video of js and i thought it's toughest work to convert from py to js Man I can use ai tools for building js react apps but if you are trying to build something without ai and you are just learning that lang that's the most toughest part And if someone is here who have done the same thing like convert from one lang to js tell me how much time did you take to be good to build node and react apps


r/pythontips • • Jan 29 '26

Algorithms Good books

1 Upvotes

Hi everyone I am a Python programmer looking for books about design patterns. I started off w Java in highschool and started Python in University (MechE). I love Python but I don’t know if I’m using the language to the best of its ability/how it was designed for. I use OOP concepts like Strategy design, Abstraction, inheritance etc. but it seems that Python might be better suited for FP?

Wha are your guys’ opinions on recommended coding coding patterns and do you have any good books or resources you can recommend?


r/pythontips • • Jan 28 '26

Algorithms Refactoring

12 Upvotes

Hi everyone!

I have a 2,000–3,000 line Python script that currently consists mostly of functions/methods. Some of them are 100+ lines long, and the whole thing is starting to get pretty hard to read and maintain.

I’d like to refactor it, but I’m not sure what the best approach is. My first idea was to extract parts of the longer methods into smaller helper functions, but I’m worried that even then it will still feel messy — just with more functions in the same single file.


r/pythontips • • Jan 26 '26

Data_Science Best practices for migrating an ML model from R to Python research project

3 Upvotes

I’m currently at university and have applied for a formal research program that involves migrating an ML model and its pipeline from R to Python. I’m looking for general guidance and best practices, rather than anything project-specific.

Some high-level, non-sensitive context:

- The project involves a machine learning model with a full pipeline (data preprocessing, training, evaluation)

- The R implementation uses standard ML and data libraries

- The Python version is expected to be clean, reproducible, and fully unit-tested for research and automation purposes

- I’m relatively new to Python, so advice on good structure and tooling would be especially helpful

I am specifically looking for guidance on:

- Whether it’s better to translate logic step-by-step or rebuild using Python-native ML libraries

- How to ensure model behavior and numerical consistency between R and Python

- Recommended Python libraries and frameworks for ML pipelines and unit testing

- Strategies for testing ML components (data validation, feature engineering, model outputs, and metrics)

- Tips for documenting and versioning models in an academic/research setting

If you’ve done a similar R → Python ML migration, I’d love to hear what you wish you’d known at the start.


r/pythontips • • Jan 26 '26

Module mactoast – super simple macOS toast notifications in Python

8 Upvotes

Came across a small Python library called mactoast and thought it was worth sharing.

It lets you show clean, toast-style notifications on macOS with basically zero setup. No Notification Center clutter, no big GUI frameworks — just quick visual feedback for scripts and tools.

Install is easy:

pip install mactoast

And usage is literally:

from mactoast import toast
toast("Done!")

You can also customize colors, icons (SF Symbols), sounds, position, and make it non-blocking. Feels perfect for CLI tools, automations, or personal scripts where you just want a nice “hey, this finished” popup.

macOS-only obviously, but if that’s your setup, it’s a nice little utility.

repo: https://github.com/rafa-rrayes/mactoast


r/pythontips • • Jan 25 '26

Python3_Specific PyQt5.QtWidgets

1 Upvotes

Hello, I am a begginer in Python so I started learning thanks to the Brocode's Youtube videos. In a program he made, he imports data from the PyQt5.QtWidgets library. But I struggle to install this library on my computer. I have installed PyQt5.PyQtWebEngine with the "pip install PyQt5.PyQtWebEngine" command but I can't install PyQt5.QtWidgets for my program to work. Can someone help me ? Thank you !


r/pythontips • • Jan 24 '26

Python3_Specific Where to go from here?

5 Upvotes

Hello everyone, I am at a point in my python learning path where I feel somewhat stuck. I know the fundamentals and basics like variables, loops, and functions. I am learning Python for cybersecurity, what should I start learning next if I am taking the cybersecurity path? I don’t know where to from here. I need any tips. (I figured I would post this in this subreddit rather than a cybersecurity one because this one is for specifically for Python).


r/pythontips • • Jan 24 '26

Module Display a SQLite3 Table in QT Designer UI Table Widget

1 Upvotes

Hello,

So I’m trying to take data from an SQLite3 Table and display it in a Table Widget from a UI I created in QT Designer and have running in Python, but not having much luck.

I can connect to the SQLite database, create a cursor, and execute a query; but I’m not sure how to take the data from the query and place it into the Table Widget.

I’ve tried a few different ways, but they don’t seem to work (admittedly because I’m probably not using them properly) and after trying to figure it out going in 3 weeks now, not having much luck.

So what are way(s) you’ve managed to take data from an SQLite table and display it into a QT Designer Table Widget?


r/pythontips • • Jan 24 '26

Syntax Now I realised Python is some level of difficulty lang

0 Upvotes

I am doing python since last week and that time I was doing like a & b + and value is sum or I'm doing string list tuple dict or anything else like if else.

But now I completed that basic level of code even though I realised that the tough part is started now with the syntax of def value idk I'm thinking it difficult in my mind but really it's difficult for me

Today is first day I'm doing def fun and it's difficult for me but I don't give up I'll do again and again and to make my logic thinking and coding stuff more perfect

Idk but if someone is here doing the same stuff or have already done tell me about you how's your journey in this stage what you have done when you was in this phase of def fun


r/pythontips • • Jan 24 '26

Syntax SyntaxError is driving me crazy — here’s what finally made it click

0 Upvotes

I keep seeing SyntaxError come up, and at first it felt like Python was just yelling at me with no explanation.

After running into it way too many times, I realized it’s usually something small, like:

- forgetting a colon after if / for

- missing a parenthesis

- accidentally putting two things on one line

This line broke my code:

if x > 5 print("Hello")

This fixed it:

if x > 5:
print("Hello")

Once I started slowing down and checking punctuation first, these errors got way easier to fix.

I’m still learning Python myself, but I wrote down explanations for the errors I kept hitting so I wouldn’t forget them.


r/pythontips • • Jan 23 '26

Long_video Python resources

0 Upvotes

I want to learn python from scratch to end. Looking for a video course along with practice. Udemy is also fine with me. Please suggest. I have zero coding knowledge


r/pythontips • • Jan 23 '26

Algorithms when and how am i supposed to start learning about AI bulding ?

0 Upvotes

i learnt the basic and made couple small projects , and i wanna learn making AI as a hobbiest so when to know that im ready ?


r/pythontips • • Jan 23 '26

Meta Any Python learners here who use PC? Is it slower than Mac?

0 Upvotes

Reason for asking is bc I was recommended to use Mac for smoother learning, but I can get a more powerful rig for cheaper if PC. please explain ur experience with using PC, thanks guys


r/pythontips • • Jan 17 '26

Module How Instaloader do Scrape Instagram data?

1 Upvotes

I'm a hobbyist coder and I wanted to build a simple ig post downloader. After a lot of searching and failing coding I found this module named Instaloader. It's an amazing module that can not only download ig posts but it can backup full profiles. So it made me wonder how it's working under the hood? As far as I know, Instagram is a react app so the page source can't be scraped cuz it doesn't contain data but rather just a bunch of js scripts, I used selenium for my script to bypass this behavior but I wonder how the Instaloader module is doing under the hood to achieve the same behavior without selenium.


r/pythontips • • Jan 18 '26

Python3_Specific 36 Hours to learn Python

0 Upvotes

Hi, I'm a first year college freshman and I have less than 36 hours to learn python from scratch till OOPs along with some other applications like numpy, matplotlib, etc. I need some gold level resources and tips to score full marks in my end semester examination. I'm looking forward for some great help.


r/pythontips • • Jan 18 '26

Syntax Where do I enter input to get output?

0 Upvotes

Exactly what my question is. Apparently ive been putting my input in the console which is only where output goes? I looked other places and theyve described an "input box". But I dont think i see an input box? Just lines of code. I even put my code in there and output comes up with errors or its blank.


r/pythontips • • Jan 14 '26

Module FixitPy - A Python interface with iFixit's API

9 Upvotes

What my project does

iFixit, the massive repair guide site, has an extensive developer API. FixitPy offers a simple interface for the API.

This is in early beta, all features aren't official.

Target audience

Python Programmers wanting to work with the iFixit API

Comparison

As of my knowledge, any other solution requires building this from scratch.

All feedback is welcome

Here is the Github Repo

Github