Pybites · @pybites
122 followers · 100 posts · Server fosstodon.org

New article:

⚠️Why you should avoid import * in Python 🐍
pybit.es/articles/why-you-shou

Covering:
- Why modules are great and namespacing explained
- Why import * is a problem
- A practical example where a function gets overriden
- The recommended way to do imports
- What PEP8 has to say about this
- Protection workaround, use __all__ to define your module's public interface

#python #pythonprogramming #modules #encapsulation #namespacing #zenofpython #bestpractices #pitfalls #imports #dundermethods

Last updated 1 year ago

Bob Belderbos · @bbelderbos
404 followers · 366 posts · Server fosstodon.org

People newer to Python often get confused by the statement:

if __name__ == "__main__":

That's many underscores ("dunders"), right?

In essence it lets you put code in your module that ONLY should execute when the module is called directly. So not when you import from it.

I explain this further with a practical example in this 3 minute video:
youtube.com/watch?v=ubpFY7_dAW

#python #pythonprogramming #encapsulation #pythoncoding

Last updated 1 year ago

Vikas Gadiya · @vgadiya
2 followers · 110 posts · Server home.social

Thin-Film Encapsulation (TFE) Market Worth $223 million by 2027

The thin-film encapsulation (TFE) market is estimated to grow from USD 92 million in 2022 to reach USD 223 million by 2027; it is expected to grow at a CAGR of 19.4% from 2022 to 2027.

More Info : marketsandmarkets.com/Market-R

The growth of the thin-film encapsulation (TFE) industry

-Film

#thin #encapsulation #tfe #oled #display #photovoltaic

Last updated 1 year ago

Eph Baum · @ephbaum
45 followers · 367 posts · Server hachyderm.io

Always fun when I get to break out this graphic 😆

#php #encapsulation

Last updated 1 year ago

GeekProjects News · @news
4 followers · 3116 posts · Server geekprojects.com
IT News · @itnewsbot
3041 followers · 254153 posts · Server schleuss.online

A Survey Of Long-Term Waterproofing Options - When it comes to placing a project underwater, the easy way out is to just stick i... - hackaday.com/2023/03/27/a-surv -to

#how #waterproof #underwater #waterproofing #encapsulation #encapsulating

Last updated 1 year ago

Thomas Lepelletier · @thomaslepelletier
0 followers · 17 posts · Server masto.ai
berkes 🐝 🚐 🏄 🌱 · @berkes
700 followers · 5682 posts · Server bitcoinhackers.org

I once was hired as consultant to guide a team who wanted move their monolith to . We got only halfway. And it was good!

The route to microservices goes via , , and . Bounded contexts, decoupling and modules was enough to put the team back on track and moving again. We never built a single microservice.

This week, Ted Neward wrote about this idea in a post that I now no longer have to write:

blogs.newardassociates.com/blo

#softwarearchitecture #encapsulation #decoupling #domainmodeling #microservices

Last updated 2 years ago

Niels Pflaeging · @nielspflaeging
634 followers · 757 posts · Server mastodon.social

@leonid
Oh, that's interesting. Please send your former boss my regards!
I also think that Beta transformation at VW as a whole is not about to happen next year. ;-)
But here is the good news (so to speak) - and it is manifold:
- The company is suffering, and has been suffering for years. It needs substantial change
- Any group like VW consists of many many entities that could do , regardless of what the holding does. For this, , is necessary. But it is feasible

#betatransformation #encapsulation

Last updated 2 years ago

Rodion Borisov · @vint
3 followers · 90 posts · Server mastodon.social

Now, you'll probably ask: "Hey, Vint, isn't it better to place your templates for in one HTML file, since it's a standard way to tell editors to parse file?" 🤔

What if I tell you there is more than one document, and I would not like to violate principle? Plus it would further commit of to page source, effectively losing all the benefits of .

Well, sorry I don't do to not repeat myself. My client specifically asked for pure HTML.

#webcomponents #dry #coupling #customelements #encapsulation #ssg

Last updated 2 years ago

· @AdaPlanet
53 followers · 2261 posts · Server botsin.space
gaby_wald · @gaby_wald
70 followers · 16249 posts · Server framapiaf.org
gaby_wald · @gaby_wald
73 followers · 16269 posts · Server framapiaf.org