Questions tagged [built-in]

Built-in functions, modules and classes are standard parts of a programming language or framework.

Filter by
Sorted by
Tagged with
0 votes
1 answer
46 views

Add method to OS built-in module

My understanding is that os is not a class, but rather a built-in module. Hence i cannot subclass it ? Is that right ? I then tried to simply add the method to os (see below). While this compiles and ...
fassage's user avatar
-1 votes
0 answers
72 views

What is happening "under the hood" for any() in python?

I've developed a habit of using any() for avoiding "elif hell" and I've been wondering whether it's impacting my code. Particularly when used in for loops. After testing it out, for the most ...
Robert Gates's user avatar
0 votes
0 answers
16 views

Crostini Built-In Camera Support?

I was trying to get my built-in camera working on my chromebook for my linux vm. I saw that there was a usb device that I could connect to linux which was "HP Wide Vision HD Camera". I ...
Stevon's user avatar
  • 31
0 votes
2 answers
40 views

Python Extend Subclass Overload Built-In Int or List Class and object creation using Int() Brackets vs List()

Python Version = 3.9.6 IDE = vscode Hi Folks, forgive me if i dont use the right terminology/nomenclature. Could really use your help with the following: Im trying to subclass/extended/overload the ...
fassage's user avatar
1 vote
0 answers
87 views

Why there is no __builtin_div_overflow function in gcc?

There are __builtin_add_overflow, __builtin_sub_overflow and __builtin_mul_overflow, but there is no __builtin_div_overflow function in gcc. It will overflow if you divide INT_MIN by -1. Now I have to ...
Vasya Pupkin's user avatar
0 votes
0 answers
21 views

PowerShell Profile Locations Built-in Directory/Folder Usage: How to Use Built-in Scripts directory?

I was recently investigating using PowerShell profiles, namely the profile found at %USERPROFILE%\Documents\WindowsPowerShell\. Here, there are two folders / directories that are built-in/out-of-the-...
johhny tex's user avatar
0 votes
2 answers
63 views

In the python functions `all` and `any`, what does the second undocumented argument do? [duplicate]

Background The output of help(all) is: Help on built-in function all in module builtins: all(iterable, /) Return True if bool(x) is True for all values x in the iterable. If the iterable ...
Trevor Boyd Smith's user avatar
0 votes
0 answers
26 views

Workaround for calling `open()` in `__del__()` for a function decorator

I am writing a function decorator to perform profiling of a function, it stores information about the function during execution and outputs the information into a log file. The implementation causing ...
finlay morrison's user avatar
4 votes
1 answer
40 views

How can non-built-in type instances be immutable in python?

If I try to run import numpy as np type(np.dtype).moo = 7 then I get TypeError: cannot set 'moo' attribute of immutable type 'numpy._DTypeMeta' which I can't find an explanation for. numpy....
to7m's user avatar
  • 61
-2 votes
1 answer
66 views

Ansible lineinfile module to update a same file simultaneously

I have a ansible playbook which executes specific tasks on remote nodes and update a file on localhost (master server) using lineinfile and delegate to localhost. If the execution happens ...
Bala's user avatar
  • 7
0 votes
0 answers
9 views

I have a problem with the python terminal

When I try to use the help command with any module it gives me this message: C:\Users**\AppData\Local\Microsoft\WindowsApps\python3.10.exe: can't open file 'e:\python\078 - Modules Part 3 Install ...
Pierre Baher's user avatar
0 votes
0 answers
10 views

__builtin_expect_with_probability use in gcc [duplicate]

The use of builtin_expect_with_probability gcc function is for condition check with probability like in below example __builtin_expect_with_probability(!!(x),1,1.0) can someone tell me what is the ...
Naval's user avatar
  • 1
1 vote
0 answers
24 views

Is there an equivalent of __data_start__ in clang/lld?

For debugging purposes I need to programmatically access variables in my program using their addresses from the map file. This requires me to find the offset between compile-time addresses and runtime ...
Dmitry Grigoryev's user avatar
0 votes
0 answers
14 views

How is the built-in function of GCC implemented? Is there any corresponding source code? Such as __builtin_offsetof [duplicate]

In the process of looking at the code, I see the built-in function __builtin_offsetof of the compiler and then I can't see the implementation inside, and I am very interested in how the underlying ...
jihan duan's user avatar
0 votes
1 answer
64 views

How do I click a checkbox if its not already, in BROWSER library of ROBOT FRAMEWORK?

I want to click a input checkbox if its not already checked but if its checked leave it and dont do anything. I looked into documentation but didn't find answers. Tried to ask ChatGPT but it gave ...
Naam's user avatar
  • 1
0 votes
0 answers
55 views

How to run shell builtin commands (that must change state of shell process) in background

I have asked a similar question but after revisiting some of my code I remembered from where the main issue stemmed from, here is the link to the old question. How to implement built-in commands for ...
Newb's user avatar
  • 145
0 votes
1 answer
86 views

How are shell builtin commands run in background?

Main concern/question I am implementing a simple shell written in C on with proper job control and I have some confusion as to how can a builtin command get to run in background meaning as a part of a ...
Newb's user avatar
  • 145
1 vote
1 answer
52 views

Negative Real Solution of nthroot - Python

I am scaling data using the built-in power operation in Python. However, I noticed that when trying to nth-root negative numbers (for odd n), I receive the solution of x^n = -N corresponding to theta =...
theoreticalmasterrace's user avatar
0 votes
2 answers
51 views

How can I manually count the length of an array?

I'm trying to find length of array without built-in length property. Is this a right way? It is going in infinite loop. let array = [1, 2, 3, 4, 5]; let i; let count = 0; while (array[i] != '...
sowkharnika's user avatar
3 votes
3 answers
351 views

How can I use the "builtin" function __builtin_ctzll in a VS C++ Project?

I have found out about __builtin_ctzll to count trailing zeros of a 64bit int really fast through the post Intrinsic to count trailing zero bits in 64-bit integers?. I'm a beginner to C++ and don't ...
Paul's user avatar
  • 43
3 votes
1 answer
84 views

Can you clarify the distinction between __builtins__ and builtins in python

There are many builtin functions that you can use without having to import anything. These include things like pow(), open(), sum(), max(), etc. However, if you want to see the complete list with dir(...
rkg125's user avatar
  • 41
0 votes
2 answers
93 views

How to get GCC Built-in Functions definition?

I want to get GCC Built-in Functions definition. I have downloaded gcc-releases-gcc-8.5.0 source code. In the source code, I have found the source code corresponding with GCC Built-in Functions ...
shu's user avatar
  • 31
-1 votes
1 answer
81 views

Android Building ERROR Warning: React.jsx: type is invalid -- expected a string but got: undefined

enter image description here enter image description here Here is my written VS code my error after running After scanning the QR code to open the app on my phone using Expo Go tried searching the ...
Neddy Glen Jean Baptist's user avatar
1 vote
1 answer
98 views

How can get the source code of built-in class? [duplicate]

property is a class in python. type(property) <class 'type'> callable(property) True I want to get the source code of the built-in class: import inspect inspect.getsource(property) Traceback (...
showkey's user avatar
  • 474
3 votes
3 answers
842 views

What is the difference between max() and maximum() in Julia?

I am currently learning about the built-in functions in Julia, specifically max and maximum, and I am seeking clarification on their differences. julia> max(1, 2, 3, 4) 4 julia> maximum([1, 2, 3,...
Pham Hung's user avatar
0 votes
0 answers
33 views

pickle load No module named '__builtin__'

Can someone help me here. I haven't found a solution online that work yet print('Restoring variable environment') with open(VARIABLES_FILE,'rb') as variables_file: Compartment_CL = pickle.load(...
Helena's user avatar
  • 19
0 votes
1 answer
88 views

Configure TeamCity built-in authentication password complexity requirements

We are currently using built-in authentication for our TC server which means it is all managed by the TC server. It appears out of the box there is no password complexity, min length etc. required and ...
hamish's user avatar
  • 447
2 votes
0 answers
28 views

Deepcopy somehow changes set.difference behaviour [duplicate]

Lately I noticed that copy.deepcopy changes the behavior of set.difference. I have a class called Foo that implements hash returning the id attr. I create two instances of this class each with a ...
Martim Martins's user avatar
0 votes
1 answer
337 views

Getting resource name in other template

I have a template which I'm generating a name using uuidv4 built-in function: apiVersion: k6.io/v1alpha1 kind: pod metadata: name: test-{{ uuidv4 }} namespace: {{ .Release.Namespace }} Then, I ...
Ido Segal's user avatar
  • 390
-1 votes
1 answer
50 views

Built-in dataset in Python package

I made a Python package that I want to upload to PyPI. I want the package to have built-in dataset based on the csv file. Package has the folder 'load' that contains csv files necessary for built-in ...
AM1995's user avatar
  • 9
1 vote
1 answer
55 views

Overriden builtins affect live debugging

I overrided open function, so that to bypass the file path length limitations in Windows, by providing the \\?\ code before each path (no admin privileges to change regedit, and the code is ...
Vasilis Lemonidis's user avatar
0 votes
1 answer
25 views

No builtin modules when calling b2 on a file with -f

Given the file test.jam: import path ; Running it with b2 -f test.jam gives: test.jam:1: in module scope ERROR: rule "import" unknown in root module. even though path is one of the builtin ...
Gabriel Devillers's user avatar
0 votes
0 answers
28 views

TypeError: unsupported operand type(s) for *: 'generator' and 'int' [duplicate]

I was trying to create a list conformed by n sub-lists, which are conformed by a k amount of a specific number (0) using list comprehension. The idea is that it would generate a matrix of 0 of ...
J Cifre Barrio's user avatar
1 vote
2 answers
44 views

exec function is not executing and is not raising error (python)

I'm a beginner programmer and I am trying to understand the difference between these three functions. Originally my problem is a bit different but I made it this easy for not to take your time a lot. ...
Begmattea's user avatar
1 vote
2 answers
155 views

How to find the list of all builtin functions of Julia

How to get the list of all built-in functions of Julia Programming Language? Once the Julia command line is started, what functions can I use and how to get the list of builtins? I mean without ...
Vinod's user avatar
  • 4,208
1 vote
0 answers
65 views

ast or syntax tree for all the locals() and globals() in a python file

How do I get the tree for all the locals() and globals() in a python file parsed in a string or a shell stdout. I am getting this right now for globals: { '__name__': '__main__', '__doc__': ...
Gary's user avatar
  • 2,313
0 votes
0 answers
37 views

Is it possible to create a 'class constructor with a unicode caracter' in python? [duplicate]

By 'class constructor with a unicode caracter' I mean an analogous to the list constructor '[' or the tuple constructor '('. For exemple, can I define a class Circular_List, a '|' constructor such ...
Aron Maciel's user avatar
1 vote
1 answer
54 views

Add extension to List of enums

I have an array of enums and would like a convenient method to access the enum string representation directly. As an example. I have the following enum from enum import Enum class Countries(Enum): ...
9001_db's user avatar
  • 81
0 votes
0 answers
106 views

Will "from builtins import str" will make any change?

I am migrating from Python2 to Python3 and using the futurize module. When I ran the futurize commands, from builtins import str got imported in my constants.py file where only constants are declared ...
Aman Raheja's user avatar
2 votes
1 answer
602 views

Difference of Android Automotive an Google built-in

I recently read that Google calls "Android Automotive OS" now "Google built-in". On some different articles i read that it's still called AAOS and Google built-in is only used for ...
froots's user avatar
  • 125
0 votes
1 answer
51 views

How can you override the argspec of a python function, e.g. to make the result of the help() function more useful?

I have a python function that only takes in keyword arguments: def my_func(**kwargs): I am splitting the keyword arguments among two separate functions, which have their keyword arguments defined ...
Yes's user avatar
  • 331
1 vote
0 answers
90 views

How do I determine the time complexity of an algorithm when using built in functions?

I am having trouble determining the time complexity of my algorithm on leetcode. I read through various sources including cracking the coding interview, but it hasn't fully clicked yet and I find that ...
GeorgeCiesinski's user avatar
1 vote
0 answers
48 views

What is the replacement for drwtsn32 -p <PID>? OR how to do a PID stack trace in windows without installing anything

For many years, I used drwtsn32 -p when I needed a stack trace on a LOCKED DOWN customer computer and I needed a stack dump. Since then, I have been fortunate enough to not need this functionality ...
Señor CMasMas's user avatar
1 vote
1 answer
126 views

Are Array, Object, Map built-in constructor functions or classes?

In some places, they say that Array, Date and Object are built-in classes. However, I find that they can all be called without new which isn't supposed to be possible with classes. And even though Map,...
Superhuman's user avatar
0 votes
1 answer
105 views

is a matching __sync_lock_release mandatory?

I am reviewing some circa 2013 C code that uses __sync_xxx built-ins. Mostly these look fine but in one case I found a __sync_lock_test_and_set() without __sync_lock_release(). It looks like the ...
Jeff Brower's user avatar
0 votes
0 answers
60 views

Plex agent does not have Python builtins

Context: I'm writing a Plex agent to add metadata to some private content. Plex agents run on Python version 2.7.17 (default, Oct 25 2022, 10:42:21) (according to sys.version). I'm running into this ...
Ieuan's user avatar
  • 1,149
0 votes
1 answer
393 views

Why does __builtin_constant_p evaluate to false for a constexpr std::string_view argument?

I need to interface with an API that expects compile time static strings. It enforces them via using static_assert (__builtin_constant_p (str)); To be more specific, I'm referring to the Apple ...
PluginPenguin's user avatar
0 votes
0 answers
42 views

Handlebar-helpers built-in blocks. Complex sum

Without creating a new helper and just use the existing one's from "handlebar-helpers" So I am actually trying to add the values in the below specified payload. { "products": [ ...
That Coder's user avatar
1 vote
1 answer
96 views

How to format a number using format() or to_char() bulilt in functions in PostgreSQL

How do i format a number to be in the following format 31_235,3400 , I tried using to_char() built in function, but every time I am getting wrong output. So the selling price of the drug should be ...
John's user avatar
  • 13
0 votes
1 answer
41 views

what is the vim native key comb that will show what is received on next input?

I forgot the key combination for this functionality and I tried to search a bit unfortunately to no avail. I think it was actually a super simple combination of control or shift with a letter key. The ...
tenxsoydev's user avatar

1
2 3 4 5
24