Blender 2.92.... python question: what is deque()?

nothing is needed to proove python is a bunch of sh*t :rofl:

therefore and instead of rumbling, i’ll only ask to experts what this piece of code does ?

rofl_lmao = deque()

A clue: this initialises something :slight_smile:
but what ?

another clue:
on the script top there’s

from collections import deque

Though this could make you smile, i sincerely thank those who can answer !
:cold_face:
happy blending !

Lol… You still fighting with python.

You keep repeating that sentiment while asking the most basic ass questions proving you have no fucking idea what you’re talking about. Your immeasurable ability to be obnoxious and full of shit is why I haven’t been bothered answering most of your many threads.
Apparently you can’t read even the most basic language documentation and yet feel it appropriate to make sweeping judgements about the language seen as the gold standard for scripting throughout the 3d industry?

Python is not without its issues, but inscrutable it absolutely isn’t.

Assigning the result of a function to a variable. Like any other language. Typically you’d learn this after print("Hello World").

What’s to explain here? From the collections module import the deque function. You can infer that it’s a function because it’s lower case. Hovering over the function call in any worthwhile code editor would would show the docstring for quick reference to functionality.
Better yet read the full documentation.

3 Likes

Honestly I wouldn’t even bother

1 Like

I do :slight_smile:
and be sure @Calandro it’s not a pleasure^^

@init_pixel
thanks for answering to one of my many thread !
It’s this rare to be granted by the words of a language semi-god, that i confess i’m honored^^

As you guess i didn’t read the full documentation and i didn’t find any usefull info on the deque method.
Sorry to say that i’m not familiar with all python onomatopoeia but deque just means nothing except maybe to python experts.

thanks for you emphasized answer and happy blending !

Keep in mind that you’re asking for help with python in a community full of people who have spent a lot of time learning and using python. Consider your words a bit more carefully when asking questions if you expect people to help you, otherwise you’re going to alienate those you’re relying on for help.

It’s pretty easy to blame the language when you’re having a hard time learning something, but in this case it’s not the language because deque is not a ‘python thing’ this is a ‘programming thing’. It is a double-ended queue (hence, deque). It’s a list-like structure that allows for very fast push/pops on either end. Here it is in C++ for example, since you dislike python so much.

2 Likes

Two minutes of google will inform you of places deque is used, that you don’t understand the language and are therefore cursing it due to your lack of knowledge isn’t helping your cause when asking questions. Neither is the fact that your attitude towards others means there will be a tendency towards not wanting to offer assistance.

I literally typed in “blender python deque” to google, it led me here, which gives you a rough indication of how it is used by people who use it discussing it. That you don’t know what a function is, how it is called, what return values are does not make the whole coding language stupid.

2 Likes

Did i offend anyone ad-hominem ? did i write a name or a pseudo ?
Is it forbidden to say what i think of a language when i think it ?
do you prefer people smiling at others they scorn ?
I’m sorry not to be mickey mouse, smiling at every wonderfull things in this wonderfull world where every new thing is a wonderfull invention.
I know it bothers people when you’re not like them but i attacked noone in particular and when i say i hate cabbage it’s not directed towards the farmer who made it grow.
It’s hard in this world to think different things than the herd and to most, it deserves, as you say, some kind of banishing.
I know and assume this and finally am not sad that some people don’t even bother.

Nevertheless i thank you for you answer and the time you took to write it :slight_smile:
Finally, and thanks to you, ben and testure i now know what is deque and i didn’t even know it existed in C++ :rofl: . Proof, if needed, that i’m far from knowing all ! My bad was to search for
blender 2.8 python deque wich don’t gives you obvious answer.
I use to search for blender 2.8… just because of the hours or days i lost trying things for BL <= 2.79 that don’t work anymore in >= 2.8

As a last word i’m quite happy the ivy addon can now work a bit differently and ( too slowly ) handle leaves in a collection. Though i really struggled changing some pieces of code, i leave it to who wants it :slight_smile:

Thanks and happy blending !

You don’t have to smile,but people are likely to handle the reply in the same manner as the question. “What is this piece of crap?” will, obviously, get a different response than “can anyone clarify what this function actually does?”
This is, after all, a medium where the persons disposition cannot be garnered from things we take for granted, such as facial gestures and body language. Oftentimes, this can lead to, at best, mis-interpretation of a request and the knowledge of the person behind that request.
Plus, I think we can agree, there’s a fair few posts where it goes from “I’ve just downloaded Blender”, to “How do I write a plugin that makes it do X.Y.Z?”, or variations on that theme, which does alas colour ones reactions. :wink:

1 Like

changed the title for beeing more explicit :wink:

1 Like